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

How to Hide a slider using javascript

1 Answer 105 Views
This is a migrated thread and some comments may be shown as answers.
Kalyani Mantripragada
Top achievements
Rank 1
Kalyani Mantripragada asked on 13 Sep 2010, 03:26 PM
Hi, is it possible to set the visibility property of the slider using javascript?

A server side property  Visible =false  (below), is working fine.

telerik:RadSlider ID="radSlPrice" runat="server" IsSelectionRangeEnabled="True" Width=170px TabStop=true 
                MaximumValue="1000000" SelectionEnd="1000000" Skin="Office2007" SlideStep="500"
Visible =false   OnClientValueChanging="OnClientValueChanging" OnClientValueChanged="OnClientValueChanged" OnClientSlideStart="OnClientSlideStart" OnClientSlideEnd="OnClientSlideEnd"   ShowDecreaseHandle=false ShowIncreaseHandle =false >

I need to hide the slider for certain cases on my web page. Please advise.


1 Answer, 1 is accepted

Sort by
Svetlina Anati
Telerik team
answered on 16 Sep 2010, 10:06 AM
Hi Kalyani Mantripragada,

 I already answered your other thread and for your convenience and for others who might have the same question, I pasted my reply below:

The RadSlider control can be hidden and shown by wrapping it in a DIV element and changing its display. Note, that you should also call its method repaint:

Copy Code
    function ToggleVisibility()
        var divElem = $get('wrapper'); = == "none" ? "" : "none";
<div id="wrapper">
    <telerik:RadSlider ID="radSlPrice" runat="server">
<button id="btn" onclick="ToggleVisibility(); return false;">
    Show/Hide slider

the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Asked by
Kalyani Mantripragada
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Share this question