Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1180
WebDropDown SelectedValue = null after filling with data.
posted

When WebDropDown on UpdatePanel is filled with data it shows first item from its data source.

In code behind when I handle link button click it claims that SelectedValue = null, although from user point of view there is some selection visible on the screen.

What should I do to get selected value properly?

Nothing special here I guess :

<ig:WebDropDown ID="cmbUN" runat="server" DataSourceID="ADR_uny" TextField="un_str"
Width="200px" DropDownContainerWidth="300px" EnableAutoFiltering="Client" ValueField="id_un">
<DropDownItemBinding TextField="un_str" ValueField="id_un" />
</ig:WebDropDown>

Parents
  • 8736
    posted

    Hello, In order to get selected value, I would recommend you to handle SelectionChanged event which will fire when post back is caused after selection is made as shown below:

    protected void WebDropDown1_SelectionChanged(object sender, Infragistics.Web.UI.ListControls.DropDownSelectionChangedEventArgs e)

    { string nwsel= e.NewSelection.ToString(); }

    I hope this helps.

Reply Children