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

Does set_visible work?

6 Answers 123 Views
Input
This is a migrated thread and some comments may be shown as answers.
Sean
Top achievements
Rank 2
Sean asked on 29 Jun 2009, 03:21 PM
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>

 

6 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 30 Jun 2009, 06:00 AM
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.
0
Daniel
Telerik team
answered on 01 Jul 2009, 01:03 PM
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.
0
loowool
Top achievements
Rank 2
answered on 19 Nov 2009, 02:13 PM
I have the same problem (i.e. nothing happens) in Q3/2009 with the set_visible(false) on RadDatePicker

Salah A. Malaeb
TeknoBuild
0
Dimo
Telerik team
answered on 19 Nov 2009, 03:17 PM
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.
0
loowool
Top achievements
Rank 2
answered on 19 Nov 2009, 03:31 PM
Thanks for your prompt reponse. Will the set_visible() function work on all RadInput based controls, i.e. RadNumeric, RadTextBox, and RadSlider?
0
Dimo
Telerik team
answered on 19 Nov 2009, 03:45 PM
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.
Tags
Input
Asked by
Sean
Top achievements
Rank 2
Answers by
Shinu
Top achievements
Rank 2
Daniel
Telerik team
loowool
Top achievements
Rank 2
Dimo
Telerik team
Share this question
or