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

How do you set the initial values of a RangeSlider?

3 Answers 83 Views
Slider
This is a migrated thread and some comments may be shown as answers.
Luke
Top achievements
Rank 1
Luke asked on 17 Dec 2013, 04:57 PM
I am using MVC style API to test and develop these tools.
I am using a range slider

    @(Html.Kendo().RangeSlider()
         .Name("yearRange")
         .Min(2000)
         .Max(DateTime.Today.Year)
         .SmallStep(1)
         .LargeStep(5)
         .Values(new double[] { 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2010, 2011, 2012, 2013 })
)

but I cannot see the property to set the initial value of this control.

can someone help me please :)

3 Answers, 1 is accepted

Sort by
0
Accepted
Hristo Germanov
Telerik team
answered on 18 Dec 2013, 12:15 PM
Hi Luke,

I am no sure what you want to do. Values method will set values for the this widget but the Range Slider contains only 2 values(selectionStart and selectionEnd). Could you please give me more information about your current scenario thus I will be able to give you a quick resolution.

Regards,
Hristo Germanov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Luke
Top achievements
Rank 1
answered on 18 Dec 2013, 03:53 PM
I realised my mistake later on.

I assumed the "values" property is the values of the datasource which is why I populated it with every year from 2000 to 2013.

since the RangeSlider does not seem to allow more than 2 values, would it not be better to have an API which is SetMinValue()  and SetMaxValue()

does the RangeSlider support more than 2 selected values?? if it does then I am wrong.
0
Hristo Germanov
Telerik team
answered on 20 Dec 2013, 09:58 AM
Hello Luke,

The RangeSlider doesn't support more then 2 values and if you need to change the slider min/max you need to recreate it.

I hope this helps.

Regards,
Hristo Germanov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Slider
Asked by
Luke
Top achievements
Rank 1
Answers by
Hristo Germanov
Telerik team
Luke
Top achievements
Rank 1
Share this question
or