How to Capture click-event of DropDownList box

Joined
Mar 24, 2009
Messages
1
Reaction score
0
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>
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,564
Members
45,040
Latest member
papereejit

Latest Threads

Top