All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:
New to Telerik UI for ASP.NET AJAX? Download free 30-day trial
RadComboBox supports codeless or Automatic Load On Demand with all kinds of data sources. This particular demo demonstrates how to implement Load On Demand binding with EntityFramework.
Setting up the automatic Load On Demand is straightforward:
Note: When you use the DataSourceID or DataSource properties to bind RadComboBox during automatic Load On Demand the ItemDataBound event fires normally, which means that you can use it to change the Item's Text and Value properties as well as modify its Attributes collection based on the DataItem, etc.
Review the following topics from the online documentation for more details:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="DefaultCS.aspx.cs" Inherits="ComboBox.Examples.LoadOnDemand.AutomaticLoadOnDemand.DefaultCS" %> <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %> <%@ Register TagPrefix="qsf" Namespace="Telerik.QuickStart" %> <!DOCTYPE html> <html xmlns='http://www.w3.org/1999/xhtml'> <head runat="server"> <title>Telerik ASP.NET Example</title> </head> <body> <form id="form1" runat="server"> <telerik:RadScriptManager runat="server" ID="RadScriptManager1" /> <telerik:RadSkinManager ID="RadSkinManager1" runat="server" ShowChooser="true" /> <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server"> <div class="demo-container size-thin"> <telerik:RadComboBox RenderMode="Lightweight" ID="RadComboBox1" runat="server" Height="180" Width="300" DataSourceID="EntityDataSource1" DataTextField="ContactName" DataValueField="ContactName" EnableAutomaticLoadOnDemand="true" ShowMoreResultsBox="true" EnableVirtualScrolling="true" ItemsPerRequest="10"> </telerik:RadComboBox> </div> <asp:EntityDataSource ID="EntityDataSource1" runat="server" ConnectionString="name=NorthwindReadWriteEntities" DefaultContainerName="NorthwindReadWriteEntities" EntitySetName="Customers" Select="it.[ContactName]" AutoPage="true" OrderBy="it.[ContactName]" /> </telerik:RadAjaxPanel> <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="ConfigurationPanel1"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="ConfigurationPanel1" LoadingPanelID="RadAjaxLoadingPanel1" /> <telerik:AjaxUpdatedControl ControlID="RadComboBox1" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> </telerik:RadAjaxManager> <qsf:ConfiguratorPanel runat="server" ID="ConfigurationPanel1"> <Views> <qsf:View> <qsf:ConfiguratorColumn ID="ConfiguratorColumn1" runat="server"> <qsf:RadioButtonList ID="FilterStartsWith" runat="server" Label="Filter" AutoPostBack="true"> <asp:ListItem Text="StartsWith" Value="0" Selected="True" /> <asp:ListItem Text="Contains" Value="1" /> </qsf:RadioButtonList> </qsf:ConfiguratorColumn> </qsf:View> </Views> </qsf:ConfiguratorPanel> </form> </body> </html>