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

Getting ListView Client Object

To get reference of the RadListView client-side object, you can use one of the following approaches:

  • Using the $find(id) method (shortcut for the findComponent() method) of the ASP.NET AJAX framework:
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
    <script type="text/javascript">
        function GetListView() {
            var listview = $find("<%= RadListView1.ClientID %>");
        }
    </script>
</telerik:RadCodeBlock>
  • Subscribing for the OnListViewCreated client-side event of the control. In its handler the sender argument references the listview client object:
<telerik:RadCodeBlock ID="RadCodeBlock2" runat="server">
    <script type="text/javascript">
        var listView = null; function ListViewCreated(sender, eventArgs) {
            listView = sender;
        }
    </script>
</telerik:RadCodeBlock>
<telerik:RadListView ID="RadListView1" runat="server">
    <ClientSettings>
        <ClientEvents OnListViewCreated="ListViewCreated" />
    </ClientSettings>
</telerik:RadListView>
In this article