Remove TagCloudItem

2 posts, 0 answers
  1. Iason Demiros
    Iason Demiros avatar
    6 posts
    Member since:
    Nov 2007

    Posted 04 Aug 2011 Link to this post

    I have a question about removing a RadTagCloudItem. I have a TagCloud and i want it to behave like most clouds. For example, if i don't like a word in the cloud i want to right-click on the word and select from a pop-up menu remove it. And the word will be removing from the cloud i see(Client-side).

    I have tried to click on the word i don't want and in server-side removing it, but it's very slow and it's not what i want. Because it's not obvious for someone else to click on the word in order to remove it.

    Any propose?

  2. Dobromir
    Dobromir avatar
    1633 posts

    Posted 09 Aug 2011 Link to this post

    Hi Iason,

    If I understand you correctly, you want the user to be able to remove items from the TagCloud. Unfortunately, RadTagCloud's client-side API does not offer the required functionality at this point. To achieve the required result you can handle the RadTagCloud's ClientLoad event and manually handle the right click, e.g.:
    <telerik:RadTagCloud ID="RadTagCloud1" runat="server" OnClientLoad="OnClientLoad">
            <telerik:RadTagCloudItem Text="text1" Weight="1" />
            <telerik:RadTagCloudItem Text="text2" Weight="2" />
            <telerik:RadTagCloudItem Text="text3" Weight="3" />
            <telerik:RadTagCloudItem Text="text4" Weight="4" />
    <script type="text/javascript">
        function OnClientLoad(tagCloud, args)
            var items = tagCloud.get_items();
            for (var i = 0; i < items.length; i++)
                var itemElem = items[i].get_element();
                $addHandler(itemElem, "mousedown", rightClickHandler);

    For your convenience I have attached a sample page implementing this approach.

    Kind regards,
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Back to Top