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?
Hello Sanatan,Take a look at the created from me sample. In selection changed event the new value is showing the key instead of the text.
Hi, I just tried the code with a minor change (see in bold) and it it not working either.for (int i = 100; i <= 120; i++) { row = table.NewRow(); row["id"] = i; .... } return table;
The e.NewSelection seem to return the itemIndex instead of the DataKey of selected item. Not sure if it is a version issue ... I am using Version=10.3.20103.2120 controls.
Thanks