New to Telerik UI for ASP.NET AJAX? Download free 30-day trial

OData binding

This example demonstrates how to populate RadListBox from OData enbaled service via RadODataDataSource.

  • DefaultCS.aspx
<%@ Page Language="C#"  %>

<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
<!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" />
    <div class="demo-container size-thin">
        <telerik:RadODataDataSource runat="server" ID="RadODataDataSource1">
            <Transport>
                <Read Url="https://demos.telerik.com/kendo-ui/service/Northwind.svc"></Read>
            </Transport>
            <Schema>
                <telerik:DataModel ModelID="Category" Set="Categories">
                    <telerik:DataModelField FieldName="CategoryID"></telerik:DataModelField>
                    <telerik:DataModelField FieldName="CategoryName"></telerik:DataModelField>
                </telerik:DataModel>
            </Schema>
        </telerik:RadODataDataSource>
        <telerik:RadListBox RenderMode="Lightweight" runat="server" ID="RadListBox1" ODataDataSourceID="RadODataDataSource1"
            DataModelID="Category" DataTextField="CategoryName" DataValueField="CategoryID"
            PersistClientChanges="false" Height="200px" Width="300px">
        </telerik:RadListBox>
    </div>
    </form>
</body>
</html>

Support & Learning Resources

Find Assistance