Hi,
I am developing a web application using asp.net mvc3.
I have 3 model classes(code first)
ProductGroup(parent)->Product(child)
then while creating a new product productgroup names come int the drop down list by writing the following code
in controller,
ViewBag.ProductGroupID = new SelectList(db.ProductGroups, "ProductGroupID", "Name", product.ProductGroupID);
in view:
<div class="editor-label">
<%: Html.LabelFor(model => model.ProductGroupID, "ProductGroup") %>
</div>
<div class="editor-field">
<%: Html.DropDownList("ProductGroupID", String.Empty) %>
<%: Html.ValidationMessageFor(model => model.ProductGroupID) %>
</div>
and
product(parent)->PreferedLocation(child)
now my requirement is I have to create a preferedlocation for each individual product,means while creating a new preferedlocation the the particular product name will have to display
only single product not in drop down ,
how to do this one ,
if any one know the answer plz help me.