Edit this page

OnClientItemClicked

The OnClientItemClicked event occurs when an item of the RadTagCloud control is clicked, immediately after the OnClientItemClicking event.

The event handler receives two parameters:

  1. Sender–the TagCould object that fired the event.

  2. Event arguments–event arguments object of type Telerik.Web.UI.RadTagCloudEventArgs, that exposes the following properties and methods:

Name Parameters Return Type Description
get_item RadTagCloudItem Returns the client-side object of the clicked item.

Example 1: Shows how you can use the OnClientItemClicked event to alert the text of the clicked item.

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

<script type="text/javascript">
    function OnClientItemClicked(sender, args) {
        var item = args.get_item();
        var text = item.get_text();

        alert("Item with text \"" + text + "\" was clicked!");
    }
</script>

See Also