Remove TagCloud Item

2 posts, 1 answers
  1. Needha
    Needha avatar
    14 posts
    Member since:
    Mar 2013

    Posted 15 Apr 2013 Link to this post

    Hi,

    I want to remove an item from the RadTagcloud through JS. I am able to access all the items in JS, but my delete statement generates an exception. Please help we with a JS code to delete item.

    Thanks in advance,
    Needha.
  2. Answer
    Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 15 Apr 2013 Link to this post

    Hi,

    Please try the following JavaScript to delete RadTagCloud item.

    JavaScript:
    <script type="text/javascript">
        function removeItem() {
            var RadTagCloud1 = $find("<%=RadTagCloud1.ClientID%>");
            var items = RadTagCloud1.get_items();
            for (var i = 0; i < items.length; i++) {
                if (items[i].get_text() == "YourItemText") {
                    theTagCloud.removeTagCloudItem(items[i], false);
                    return;
                }
            }
            alert("Item Not Found");
        }
    </script>

    Thanks,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top