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

Get value Cientside

1 Answer 46 Views
Slider
This is a migrated thread and some comments may be shown as answers.
Voss Grose
Top achievements
Rank 1
Voss Grose asked on 16 Feb 2009, 12:19 AM
How can I retrieve the value for a slider on the client side?

I've got the index (sender.get_value()).

can you give an exmaple of how to retrieve the value if I know the index?

1 Answer, 1 is accepted

Sort by
0
Tsvetie
Telerik team
answered on 18 Feb 2009, 06:26 PM
Hi Voss,
I suppose you have ItemType=Item and that you are trying to get the value of the selected SliderItem, not of the RadSlider itself. If this is the case, you can use the following code:
function GetItemValue() 
    var slider = $find('<%= RadSlider1.ClientID %>'); 
    var selectedItem = slider.get_items()[slider.get_value()]; 
    alert(selectedItem.get_value()); 

All the best,
Tsvetie
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.
Tags
Slider
Asked by
Voss Grose
Top achievements
Rank 1
Answers by
Tsvetie
Telerik team
Share this question
or