I have two dropdownlists within a repeater (simplified code below):
The repeater is bound to a list of products. The BindColour and BindSize methods return lists according to the productID for that Item.Code:<asp:Repeater id="rptProducts" Runat="Server"> <ItemTemplate> <asp:DropDownList id="ddlColour" Runat="Server" DataSource="<%# BindColour((int)DataBinder.Eval(Container.DataItem, "ProductID")) %>" DataTextField="ColourName" DataValueField="ColourID" /> <asp:DropDownList id="ddlSize" Runat="Server" DataSource="<%# BindSize((int)DataBinder.Eval(Container.DataItem, "ProductID")) %>" DataTextField="SizeName" DataValueField="SizeID" /> </ItemTemplate> </asp:Repeater>
My query is how can I detect that the first dropdownlist (colour) has changed value and therefore databind the second dropdownlist again to reflect the selected value.
Basically the first list contains all colours for a particular product and the second dropdown displays sizes for a product AND colour.
Help would be appreciated.
DJ




Reply With Quote