This is a migrated thread and some comments may be shown as answers.

Disable RadTagCloud or RadTagCloudItem server side

3 Answers 53 Views
TagCloud
This is a migrated thread and some comments may be shown as answers.
Johnm
Top achievements
Rank 1
Johnm asked on 19 May 2013, 10:08 PM
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,

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 20 May 2013, 06:43 AM
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.

0
Johnm
Top achievements
Rank 1
answered on 20 May 2013, 09:47 AM
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,
0
Shinu
Top achievements
Rank 2
answered on 19 Dec 2013, 09:01 AM
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.
Tags
TagCloud
Asked by
Johnm
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Johnm
Top achievements
Rank 1
Share this question
or