I have generated a project in Nettiers and the auto generated admin section has taken me 95% there! My problem is that if I have a parent entity with a list of child entities in a gridview, I can't see how to pass the id from parent to child so that I can auto populate the appropriate drop down.
For example: A customer has a list of buyers. When I add a buyer from a cutomer entity, I want to pass in the customer id and set it. Seems trivial.
In my CustomerEdit.aspx I have a MultiFormView containing Customer data followed by an EntityGridView of Buyers. The "add new" URL is something like "~/admin/BuyerEdit.aspx". I would like to add a query string something like "?customerid=<%# CustomerId %>". This doesn't seem to work?
Secondly. On the BuyerEdit.aspx page, I have a drop down list of cutomers. Again this is a template user control. Haven't used these much and they don't have a code behind! I tried adding one but I cant access the control for some reason so I can't set it as I normally would (perhaps someone can tell me that this should work and that I probably made a mistake). Again, I could do something like
-
ReadOnly='<%# (Request.QueryString{"CustomerId"] == null) ? false : true %>'
-
SelectedValue ='<%# (Request.QueryString{"CustomerId"] == null) ? String.Empty : Request.QueryString{"CustomerId"].ToString() %>'
Again this doesn't work but it's probably my syntax as I am in unfarmilliar territory (Response.Write for the strings?).
Can anyone help? It's very frustrating.
Thanks.