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

OnClientDataBound

This article demonstrates how the OnClientDataBound event can be used to trigger a logic when the data binding of the RadRortator is finished.

The event handler receives only one parameter. The RadRotator instance that fired the event.

Example 1 demonstrates how to use the OnClientDataBound event to show an alert in the browser when the data binding is finished.

Example 1: Using the OnClientDataBound event.

<telerik:RadClientDataSource runat="server" ID="RadClientDataSource1" PageSize="5" AllowPaging="true">
    <DataSource>
        <WebServiceDataSourceSettings BaseUrl="http://demos.kendoui.com/service/">
            <Select Url="Products" DataType="JSONP" />
        </WebServiceDataSourceSettings>
    </DataSource>
</telerik:RadClientDataSource>

<telerik:RadRotator RenderMode="Lightweight" runat="server" ID="Rotator" ClientDataSourceID="RadClientDataSource1"
    OnClientDataBound="OnClientDataBound">
    <ClientTemplate>
    <span class="productName">#= ProductName #</span>
    </ClientTemplate>
</telerik:RadRotator>

<script type="text/javascript">
    function OnClientDataBound(sender) {
        alert("RadRotator control is data bound!");
    }
</script>

See Also

In this article