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
555
WebDropDown DropDownSelectionChangedEventArgs not working
posted

Hi, I am using the WebDropDown control and binding to datasource at runtime as below.

igSearchCombo.TextField = "name";
igSearchCombo.ValueField = "id";
igSearchCombo.DataKeyFields = "id";
igSearchCombo.DataSource = table;
igSearchCombo.DataBind();

I have declared a ClientEvent SelectionChanged (for test purpose) and also ServerSide OnSelectionChangd method.

In ClientSide, I can see my selectedItem key showing correctly using eventArgs.getNewSelection()[0].get_value().

My WDD control declaration for TextField, ValueField, DataKeyFields in ASPX page is also set correctly to the right data-column names.

But on serverside, the DropDownSelectionChangedEventArgs e does not show the selectedItem key when I query the e.NewSelection. The later only returns the index of the selected value but not the actual key.

Am I missing something?

Parents Reply Children