This is a migrated thread and some comments may be shown as answers.

How to Select Item after Initiating requestItems Callback

1 Answer 117 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
sara
Top achievements
Rank 1
sara asked on 10 Jun 2008, 08:58 PM
How do you select an item after manually firing a requestItems callback?  I'm calling:

combo.requestItems(valueToSelect, false); 

The valueToSelect is the value I want selected in the combo box.  I've tried selecting the item when populating the list on the server during the callback, but this doesn't work.  It used to work in RadControls for ASP.NET, but in this version it does not work.  I've read several posts about how you can't do this. 

So, my question is, how do I select the item in the combo box without using a global javascript variable?

Thanks,
Sara

1 Answer, 1 is accepted

Sort by
0
Simon
Telerik team
answered on 12 Jun 2008, 09:33 AM
Hello sara,

You could hook on the OnClientItemsRequested event of the ComboBox and there find the Item by value and select it. Unfortunately this will require a global variable.

Still, depending on your specific case there might be a solution which does not involve a global variable. However without first looking at your client-side logic I would not be able to suggest one.

How do you determine the valueToSelect value before requesting Items from the server?

Regards,
Simon
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
ComboBox
Asked by
sara
Top achievements
Rank 1
Answers by
Simon
Telerik team
Share this question
or