Getting the value for each range slider

2 posts, 0 answers
  1. Andrew
    Andrew avatar
    1 posts
    Member since:
    Apr 2008

    Posted 11 Aug 2010 Link to this post



     Have a range slider I use for a date range (years), this has two handles ‘From’ and ’To’, I need to be able to track these two slider values so I can write them each to divs (two separate divs). I’ve got it working with one slider but can’t work out how to capture the second slider value, I hope you can help. Here is my code:

    From <span class="SearchHeaderNumbers"><asp:label runat="server" ID="litDateFrom" ClientIDMode="Static" Text="" /></span> to <span class="SearchHeaderNumbers"><asp:label runat="server" ID="litDateTo" ClientIDMode="Static" Text="" /></span><br />
                            <div class="DateRange">
                                <telerik:RadSlider ID="rsDateRange" runat="server" AutoPostBack="true" BackColor="#F5F5F5" EnableEmbeddedSkins="true" SelectionStart="1996" ItemType="Tick" OnClientValueChanging="clientValueChange" ShowDecreaseHandle="false" ShowIncreaseHandle="false" SelectionEnd="2010" IsSelectionRangeEnabled="true" LiveDrag="true" DragText="" MinimumValue="1996" MaximumValue="2010" Width="167px" />





                                <script language="javascript" type="text/javascript">
                            function clientValueChange(sender, eventArgs) {
                                var myDateFrom = document.getElementById("litDateFrom")
                                myDateFrom.innerHTML = sender.get_value();
                                var myDateTo = document.getElementById("litDateTo")
                                // myDateFrom.innerHTML = ??? Some code ???

    as I mentioned I can get the value from sender.get_value() which which gives me the value for the start slider but the end slider I'm lost about.


  2. Tsvetie
    Tsvetie avatar
    1517 posts

    Posted 12 Aug 2010 Link to this post

    Hi Ed,
    In this case, you should use the get_selectionStart and get_selectionEnd client-side methods of RadSlider. Please refer to our online documentation for additional information on the client-side API of the control:

    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
  3. DevCraft R3 2016 release webinar banner
Back to Top