How to retrieve values from date range slider?

3 posts, 0 answers
  1. Bethany
    Bethany avatar
    14 posts
    Member since:
    Mar 2015

    Posted 12 May 2015 Link to this post


    I am having a hard time finding a concrete definition or documentation on how to retrieve range values from RadSlider. I have tried several ideas I found going through these forums, the demos, and other sites online but to no avail have I found a solution. Is there something I am missing?

    Lines 1-2 return the index of the currently selected items, but not the value itself. I found this in the RadSlider demo, but I am not sure how this would work for a date range (represented as a string).

    Lines 4-5 allows me to see one of the values, but I am not sure how to get the range and not just one value.

    Lines 7-8 allowed me to see the values that I wanted, but when I tried converting the values to datetime variables, Visual Studio returned an error stating that I couldn't convert decimals to datetime.

    The end goal is to connect the RadSlider to the RadHtmlChart and have the dates of the chart correlate with what the user chooses in the slider; an example of this would be the Olympic Medal site on the Telerik demos.


    Any help would be greatly appreciated!

    1.Dim temp1 As String = rsDateRange.SelectionStart.ToString()
    2.Dim temp2 As String = rsDateRange.SelectionEnd.ToString()
    4.Dim value As Integer = rsDateRange.Value
    5.Dim str As String = rsDateRange.Items(value).Value.ToString()
    7.Dim tempStart As RadSliderItem = rsDateRange.Items(rsDateRange.SelectionStart)
    8.Dim tempEnd As RadSliderItem = rsDateRange.Items(rsDateRange.SelectionEnd)

  2. Bethany
    Bethany avatar
    14 posts
    Member since:
    Mar 2015

    Posted 14 May 2015 in reply to Bethany Link to this post

    1.Dim getSliderStart As Integer = rsDateRange.SelectionStart
    2.Dim getSliderSValue As String = rsDateRange.Items(a).Value.ToString()
    4.Dim getSliderEnd As Integer = rsDateRange.SelectionEnd
    5.Dim getSliderEValue As String = rsDateRange.Items(c).Value.ToString()
  3. Slav
    Slav avatar
    1359 posts

    Posted 15 May 2015 Link to this post

    Hi Bethany,

    As you already found out, you can get the value of a RadSlider item when you retrieve the item via its index, then access its Value property. You can find attached a sample page that demonstrates this approach.

    I agree that there is not enough documentation about using a slider with items. A request for improving the help resources on the matter is already logged and the documentation will be improved with a future update.

    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 Feedback Portal and vote to affect the priority of the items
Back to Top