Hiding a RadTextBox client-side?

4 posts, 0 answers
  1. Bob
    Bob avatar
    72 posts
    Member since:
    May 2008

    Posted 24 Sep 2008 Link to this post

    How do I had a RadTextBox via JavaScript?
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 25 Sep 2008 Link to this post

    Hi Bob,

    Try the following javascript code to achieve the desired scenario.

    ASPX:
    <telerik:RadTextBox ID="RadTextBox1" runat="server"
            </telerik:RadTextBox> 
            <input id="Button2" type="button" value="button"  onclick="OnClientClick()" /> 

    JS:
     <script type="text/javascript"  language="javascript" > 
           function OnClientClick() 
           { 
             document.getElementById("RadTextBox1_text").style.display='none'
             
           } 
         </script> 


    Regards
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Rakesh
    Rakesh avatar
    13 posts
    Member since:
    Mar 2011

    Posted 02 Nov 2011 Link to this post

    How can i hide or show a radtextbox which is part of radlistbox control..

    I am able to find it but not able to hide it or show it

    can you help me....
  5. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 03 Nov 2011 Link to this post

    Hello Rakesh,

    You can try the following javascript.

    JS:
    <script type="text/javascript">
    function OnClientSelectedIndexChanged(sender, args)
     {
       var textbox= args.get_item().findControl("RadTextBox1");
       textbox.set_visible(false);
     }
    </script>

    Thanks,
    Princy.
Back to Top