Does set_visible work?

7 posts, 0 answers
  1. Sean
    Sean avatar
    10 posts
    Member since:
    Oct 2008

    Posted 29 Jun 2009 Link to this post

    I'm trying to turn off a text box but set_visible doesn't seem to do anything.  Here's a short example:

    <%

    @ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>

     

    <%

    @ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

     

    <!

     

    DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

     

    <

     

    html xmlns="http://www.w3.org/1999/xhtml">

     

    <

     

    head runat="server">

     

     

    <title></title>

     

     

    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">

     

     

    <script type="text/javascript">

     

     

    function pageLoad() {

     

    $find(

    '<%= RadNumericTextBox1.ClientID %>').set_visible(false);

     

    }

     

    </script>

     

     

    </telerik:RadCodeBlock>

     

    </

     

    head>

     

    <

     

    body>

     

     

    <form id="form1" runat="server">

     

     

    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">

     

     

    </telerik:RadScriptManager>

     

     

    <div>

     

    Test

    <telerik:RadNumericTextBox ID="RadNumericTextBox1" runat="server"

     

     

    Culture="English (Canada)" Width="125px">

     

     

    </telerik:RadNumericTextBox>

     

     

    </div>

     

     

    </form>

     

    </

     

    body>

     

    </

     

    html>

     

  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 30 Jun 2009 Link to this post

    Hello Sean,

    Try the following approach for showing/hiding the RadNumericTextBox from client-side and see whether its is working fine.

    JavaScript:
     
    <script type="text/javascript"
    function hide() 
    {     
        var input = $find('<%= RadNumericTextBox1.ClientID %>'); 
        input._textBoxElement.style.cssText = "display:none;"
    function show() 
        var input = $find('<%= RadNumericTextBox1.ClientID %>');            
        input._textBoxElement.style.cssText = "display:block;"
    </script> 

    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Daniel
    Admin
    Daniel avatar
    4943 posts

    Posted 01 Jul 2009 Link to this post

    Hello Sean,

    Our developers already fixed the issue. Please download the latest release to test whether the set_visible method behaves as expected.

    Regards,
    Daniel
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  5. loowool
    loowool avatar
    60 posts
    Member since:
    Sep 2006

    Posted 19 Nov 2009 Link to this post

    I have the same problem (i.e. nothing happens) in Q3/2009 with the set_visible(false) on RadDatePicker

    Salah A. Malaeb
    TeknoBuild
  6. Dimo
    Admin
    Dimo avatar
    8330 posts

    Posted 19 Nov 2009 Link to this post

    Hi Salah,

    The set_visible method for RadDatePicker has now been implemented and will be available for the next service pack (due in mid December) or the next internal build.

    Greetings,
    Dimo
    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.
  7. loowool
    loowool avatar
    60 posts
    Member since:
    Sep 2006

    Posted 19 Nov 2009 Link to this post

    Thanks for your prompt reponse. Will the set_visible() function work on all RadInput based controls, i.e. RadNumeric, RadTextBox, and RadSlider?
  8. Dimo
    Admin
    Dimo avatar
    8330 posts

    Posted 19 Nov 2009 Link to this post

    Hello Salah,

    set_visible already works for all RadInput textboxes and RadSlider. RadSlider is actually not a RadInput-based control.

    Sincerely yours,
    Dimo
    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017