Disable RadTagCloud or RadTagCloudItem server side

4 posts, 0 answers
  1. Johnm
    Johnm avatar
    2 posts
    Member since:
    May 2013

    Posted 19 May 2013 Link to this post

    Hello,

    Is there any way to disable the RadTagCloud or RadTagCloudItem on a server side event?
    I have a radtagcloud, and when I click a button I am placing a div overlay on top of the RadTagCloud - the problem is that when I make the overlay div visible, if I mouseover the cloud items I can still click them. When this div is visible on top, the items should not be clickable.

    setting RadTagCloud.Enabled = false seems to have no effect.

    Thank you in advance,
    Regards,
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 20 May 2013 Link to this post

    Hi Johnm,

    I have tried your server side code to disable the RadTagCloud which works fine at my end. If you are not that specific to use server side code, One suggestion is on the client side click of the button itself, you can disable the RadTagCloud as follows.

    JavaScript:
    var tagCloud = $find("<%= RadTagCloud1.ClientID %>");
    tagCloud.set_enabled(false)

    Thanks,
    Shinu.

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Johnm
    Johnm avatar
    2 posts
    Member since:
    May 2013

    Posted 20 May 2013 Link to this post

    hi Shinu,

    Thank you for your response. Have you tried exactly my scenario, setting a overlay div on top of the radTagCloud and setting Enabled = false, then checking if the tags can no longer be clicked? For some reason in my tag cloud they can, and they shouldn't be clickable.

    Thanks,
  5. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 19 Dec 2013 Link to this post

    Hi Johnm,

    Please have a look into the sample code snippet which works fine at my end.

    ASPX:
    <div id="Container" runat="server">
        <div id="navi" runat="server">
            <telerik:RadTagCloud ID="RadTagCloud1" runat="server" MaxFontSize="25px">
                <Items>
                    <telerik:RadTagCloudItem Text="ASP.NET" Weight="10"></telerik:RadTagCloudItem>
                    <telerik:RadTagCloudItem Text="VB.NET" Weight="5"></telerik:RadTagCloudItem>
                </Items>
            </telerik:RadTagCloud>
        </div>
        <div id="infoi" runat="server" style="display: none;">
            <img src="../Images/index.jpg" height="30" width="32" />
            some data</div>
    </div>
    <br />
    <br />
    <br />
    <telerik:RadButton ID="RadButton1" runat="server" Text="Show Div" OnClick="RadButton1_Click">
    </telerik:RadButton>

    CSS:
    <style type="text/css">
        #container
        {
            width: 100px;
            height: 100px;
            position: relative;
        }
             
        #navi, #infoi
        {
            width: 100%;
            height: 100%;
            position: absolute;
            top: 0;
            left: 0;
        }
             
        #infoi
        {
            z-index: 10;
        }
    </style>

    C#:
    protected void RadButton1_Click(object sender, EventArgs e)
    {
        infoi.Style.Add("display", "block");
        RadTagCloud1.Enabled = false;
    }

    Thanks,
    Shinu.
Back to Top