<telerik:RadComboBox ID="RadComboBox2" EnableViewState="false" EnableItemCaching="true"
EnableLoadOnDemand="true" Filter="Contains" runat="server" onitemsrequested="RadComboBox2_ItemsRequested" >
</telerik:RadComboBox>
<asp:Button ID="Button1" runat="server" Text="Ok" onclick="Button1_Click" />
protected void RadComboBox2_ItemsRequested(object o, Telerik.Web.UI.RadComboBoxItemsRequestedEventArgs e)
{
RadComboBox2.Items.Add(new RadComboBoxItem("--All--", "0"));
RadComboBox2.Items.Add(new RadComboBoxItem("Accepted", "1"));
RadComboBox2.Items.Add(new RadComboBoxItem("Not Accepted", "2"));
RadComboBox2.Items.Add(new RadComboBoxItem("Pending", "3"));
}
protected void Button1_Click(object sender, EventArgs e)
{
string s = RadComboBox2.SelectedValue;
}
If we set true to "EnableLoadOnDemand" we are getting the following problem.
We are filling some values in the combobox. And on type some characters(accepted) the combobox gets filtered accordingly (refer attahced screen shot). Then without selecting the text (Accepted )in the combo press enter. while clicking the button "OK" the Selectedvalue for the entered character in the combobox becomes empty.
For example see the above code: Accepted is having value 1, this becomes empty on click of "OK" button. I think this problem is due to that the combobox is assuming the entered text as new item.
But both are same.How to solve this
Please help me
regards
sathies