I have experienced lots of problems with the RadCombobox control with trying to bind it while having Enableloadondemand set to true
I'm currently binding on my gridview OnDataBound event by creating a single item and inserting it at index 0.
Now when i need to change te selected Item the enableloadondemand fires correctly and loads items filtered on the text typed in the text area.
after selecting an item the OnSelectedIndexchanged event fires and the radcombobox text is updated to the text of the selected item.
however the Value never gets updated and I will have to perform another query to my recordset to select the value.
Since the text gets updated normally when selecting a different item how come the value doesn't ?
i have a snippet with how i handle the selectedindexchanged event.
sender, RadComboBoxSelectedIndexChangedEventArgs e)
RadComboBox rcb = (RadComboBox)sender;
// combobox that fires event
hi = rcb.SelectedValue;
// combobox value, always old value
ha = rcb.Text;
// combobox text, always text from newly selected item
hu = e.OldValue;
// working correctly always value of previously selected item
ho = e.OldText;
//working correctly always text of previously selected item
he = e.Value;
// not working as one would expect it to work, always OLD value
hy = e.Text;
// working as expected always NEW text
hiy = rcb.SelectedItem.Value;
// Always old value
hyi = rcb.SelectedItem.Text;
// always old value
DataView dv = (DataView)SqlDataSource2.Select(
// correct value after looping through intire datasource, would like to avoid this
].ToString() == rcb.Text)
huu = row[
(e.OldValue != e.Value)
// always the same so selected value never gets changed
rcb.SelectedValue = e.Value;
Is this the correct behavior ?
I would think that if you can send the correct new text , the new value should be simple too.