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

Slider range + client documenation

1 Answer 47 Views
Slider
This is a migrated thread and some comments may be shown as answers.
Bryan Brannon
Top achievements
Rank 2
Bryan Brannon asked on 02 Sep 2008, 07:48 PM
I am using the following slider on a web-form:
<telerik:RadSlider ID="RadSlider1" runat="server" OnClientValueChange="HandleValueChange" IsSelectionRangeEnabled="true"  /> 

and would like to update two textboxes with each of the slider handle values something like this:
function HandleValueChange(sender, eventArgs)  
{  
    // not sure how to tell the difference b/w the two  
    var handle1 = sender.get_activeHandle();  
    var handle2 = sender.get_activeHandle();  
      
    $get("<%=TextBox1.ClientID %>").value = handle1.get_value();  
    $get("<%=TextBox2.ClientID %>").value = handle2.get_value();  

Any code samples or documentation on get_activeHandle() or client API for RangeSliders?

1 Answer, 1 is accepted

Sort by
0
Accepted
Petio Petkov
Telerik team
answered on 03 Sep 2008, 12:03 PM
Hello Bryan Brannon,

You should use get_selectionStart() and get_selectionEnd() client-side methods, e.g.
$get("<%=TextBox1.ClientID %>").value =$find("RadSlider1").get_selectionStart(); 
$get("<%=TextBox2.ClientID %>").value =$find("RadSlider1").get_selectionEnd();


A simple example which illustrates this methods is available  here:
http://demos.telerik.com/ASPNET/Prometheus/Slider/Examples/ClientSideEvents/DefaultCS.aspx

We are currently improving the documentation and all client methods will be available in the next RadControls for ASP.NET AJAX release.

All the best,
Petio Petkov
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Slider
Asked by
Bryan Brannon
Top achievements
Rank 2
Answers by
Petio Petkov
Telerik team
Share this question
or