You can use the requestItems client method to initiate a load-on-demand callback request with the specified text,
causing the ItemsRequested server event to fire or a request to be sent to a web service.
The second bool parameter instructs the RadComboBox to append the new items (True) or clear items (False).
Please check the following code snippet.
When use LoadOnDemand items are not loaded initially. The ItemsRequested server event will be fired if the drop down is opened or if any text is typed in the combo's input. Usually in this event combo is populated with data. From code you could initially load items as call combo'srequestItems() method in the pageLoad event. For example:
<script type="text/javascript">
function pageLoad() {
var combo = $find('RadComboBox1');
combo.requestItems();
}
</script>
<div>
<telerik:RadComboBox
ID="RadComboBox1"
runat="server"
Filter="Contains"
OnItemsRequested="RadComboBox1_ItemsRequested"
EnableLoadOnDemand="true">
</telerik:RadComboBox>
</div>
Regards,
Hristo Valyavicharski
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.