How to Capture click-event of DropDownList box

Discussion in '.NET' started by AuntieMom, Mar 24, 2009.

  1. AuntieMom

    AuntieMom

    Joined:
    Mar 24, 2009
    Messages:
    1
    The situation:

    A GridView Object is populating a DetailsView Object and I have a dropdownlist within the DetailsView. When this page loads there will always be only one record in the dropdownlist object, then the user needs to click the down arrow to repopulate the dropdownlist control.

    How can I capture the <clicking> of the dropdownlist in order for me to re-populate the dropdownlist with the corresponding values.

    I have:
    <asp:UpdatePanel ID="upLD2" runat ="server" >

    <ContentTemplate >
    <asp:DropDownList ID="LD2" runat="server" AutoPostBack="True"
    DataSourceID="odsLByD"
    DataTextField="LD" DataValueField="LCode">
    </asp:DropDownList>
    <asp:ObjectDataSource ID="odsLByDi" runat="server"
    OldValuesParameterFormatString="original_{0}"
    SelectMethod="GetLByEmpID"
    TypeName="LBLL">
    <SelectParameters>
    <asp:ControlParameter ControlID="grdEmp" Name="EmpD" PropertyName="SelectedValue"
    Type="String" />
    </SelectParameters>
    </asp:ObjectDataSource>
    </ContentTemplate>

    <Triggers>
    <asp:AsyncPostBackTrigger ControlID ="LD2" EventName ="SelectInitialItem" />
    </Triggers>
    </asp:UpdatePanel>

    </EditItemTemplate>
     
    AuntieMom, Mar 24, 2009
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Purvi T
    Replies:
    0
    Views:
    925
    Purvi T
    Oct 19, 2004
  2. feng
    Replies:
    4
    Views:
    11,850
    Eric Lawrence [MSFT]
    Feb 29, 2004
  3. Benjamin Gavin
    Replies:
    3
    Views:
    558
    Alex Homer
    Sep 28, 2004
  4. Chu
    Replies:
    2
    Views:
    933
    Winista
    Apr 10, 2006
  5. Max2006
    Replies:
    2
    Views:
    1,637
    Walter Wang [MSFT]
    Sep 19, 2007
Loading...

Share This Page