OnClientItemRequesting of RadCombobox not getting fired on IE

Posted by Emil under ASP.NET on 8/15/2014 | Points: 10 | Views : 1866 | Status : [Member] | Replies : 1
There is a Telerik Rad Combobox which has three events.
OnClientItemRequesting,OnClientItemRequested,OnClientKeyPressing. All the above three events is calling a JS function.

In case of Chrome and Firefox all the three events gets fired on key press and autocomplete opens
In case of all IE only OnClientKeyPressing fire and autcomplete doesn't open

The page doctype is HTML5

Please provide a solution to the above problem

Thanks.




Responses

Posted by: Kmandapalli on: 8/18/2014 [Member] Silver | Points: 25

Up
0
Down
Hi Emil,

I have tried and its working.
Please try with the following code and let me know..

<telerik:RadComboBox ID="RadComboBox1" runat="server" EnableLoadOnDemand="True" AutoPost="true"
onitemsrequested="RadComboBox1_ItemsRequested"
OnClientItemsRequesting="OnClientItemsRequesting">
</telerik:RadComboBox>

<script language="javascript" type="text/javascript">
function OnClientItemsRequesting(sender, eventArgs) {
if (eventArgs.get_text().length < 3)
eventArgs.set_cancel(true)
else
eventArgs.set_cancel(false);
}
</script>

Code-behind:
protected void RadComboBox1_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e)
{
RadComboBox1.Items.Add(new RadComboBoxItem("Item1", "0"));
RadComboBox1.Items.Add(new RadComboBoxItem("Item2", "1"));
RadComboBox1.Items.Add(new RadComboBoxItem("Item3", "2"));
}

Mark as answer if satisfied...

Regards,
Kavya M.

Kavya Shree Mandapalli

Emil, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response