2 posts, 0 answers
  1. Paolo
    Paolo avatar
    1 posts
    Member since:
    Apr 2009

    Posted 20 Oct 2009 Link to this post

    I doesn't look like set_visible(true) works.  I tried the latest release as well as the current beta.

    set_visible(false) seems to work fine.

    I have the following code:

    var txt = $find('<%= pnl.Items[0].FindControl( "txt" ).ClientID %>'); 
    if(cb.checked) { 
    } else { 

    pnl is a radpanelbar.  txt is a radtextbox.
  2. Dimo
    Dimo avatar
    8319 posts

    Posted 21 Oct 2009 Link to this post

    Hi Paolo,

    The problem has been fixed after the beta and changes will take effect in the official release. Sorry for the temporary inconvenience. In the meantime, you can use the following workaround:

    <%@ Page Language="C#" %>
    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    <head runat="server">
    <meta http-equiv="content-type" content="text/html;charset=utf-8" />
    <title>RadControls for ASP.NET AJAX</title>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server" />
    <asp:CheckBox ID="CheckBox1" runat="server" Checked="true" />
    <asp:Button ID="Button1" runat="server" Text="Toggle Visibility" OnClientClick="return toggle();" />
    <br /><br />
    <telerik:RadTextBox ID="RadTextBox1" runat="server" />
    <script type="text/javascript">
    function toggle()
        if ($get("<%= CheckBox1.ClientID %>").checked)
            $find("<%= RadTextBox1.ClientID %>").set_visible(true);
            $find("<%= RadTextBox1.ClientID %>").set_visible(false);
        return false;
    if (typeof(Telerik) != "undefined" && typeof(Telerik.Web.UI.RadInputControl) != "undefined")
        Telerik.Web.UI.RadInputControl.prototype.set_visible = function(value)
            if (value == true && this._originalDisplay != null)
                this.get_wrapperElement().style.display = this._originalDisplay;
            else if (value == false && this.get_visible())
                this._originalDisplay = this.get_wrapperElement().style.display;
                this.get_wrapperElement().style.display = "none";

    Kind regards,
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. DevCraft R3 2016 release webinar banner
Back to Top