ComboBox - OData Binding

Isolate this demo as a stand-alone application
  • About this demo
  • C#
  • VB
This example demonstrates how to populate RadComboBox from OData enabled service via RadODataDataSource.
  • DefaultCS.aspx
  • DefaultCS.aspx.cs
<%@ Page Language="C#"  CodeFile="DefaultCS.aspx.cs" Inherits="Combobox.Examples.LoadOnDemand.OData.DefaultCS" %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<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:RadODataDataSource runat="server" ID="RadODataDataSource1">
        <Schema>
            <telerik:DataModel ModelID="Category" Set="Categories">
                <telerik:DataModelField FieldName="CategoryID" />
                <telerik:DataModelField FieldName="CategoryName" />
            </telerik:DataModel>
        </Schema>
    </telerik:RadODataDataSource>

    <div class="demo-container size-thin">
        <telerik:RadComboBox RenderMode="Lightweight" ID="RadComboBox1" runat="server" EnableLoadOnDemand="true" ODataDataSourceID="RadODataDataSource1"
            DataModelID="Category" DataTextField="CategoryName" DataValueField="CategoryID"  Width="300"
            ShowMoreResultsBox="true" ItemsPerRequest="4">
        </telerik:RadComboBox>
    </div>

    </form>
</body>
</html>

Find Assistance

Help Us Improve

Was this example helpful?