Results 1 to 2 of 2

Thread: Fire DropDownList event in a repeater *RESOLVED*

Threaded View

  1. #1

    Thread Starter
    Frenzied Member dj4uk's Avatar
    Join Date
    Aug 2002
    Location
    Birmingham, UK Lobotomies: 3
    Posts
    1,131

    Fire DropDownList event in a repeater *RESOLVED*

    I have two dropdownlists within a repeater (simplified code below):
    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>
    The repeater is bound to a list of products. The BindColour and BindSize methods return lists according to the productID for that Item.

    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
    Last edited by dj4uk; Jan 21st, 2005 at 05:50 AM. Reason: Post resolved

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width