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

OnClientLoad

The OnClientLoad event is raised when the RadTagCloud object is loaded on the page. It can notify the developer that the control is available for further client-side programmatic interaction.

The event handler receives two arguments:

  • Sender–the TagCould object that fired the event.

  • Event arguments–an empty event arguments object.

Example 1: Shows how you can use the event to alert the count of the loaded items in the TagCloud.

<telerik:RadTagCloud RenderMode="Lightweight" runat="server" ID="RadTagCloud1" OnClientLoad="OnClientLoad">
    <Items>
        <telerik:RadTagCloudItem Text="Item 1" />
        <telerik:RadTagCloudItem Text="Item 2" />
    </Items>
</telerik:RadTagCloud>

<script type="text/javascript">
    function OnClientLoad(sender, args) {
        var loadedItems = sender.get_items().length;

        alert("The TagCload is loaded with " + loadedItems + " items.");
    }
</script>

See Also

In this article