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

Slider increments

1 Answer 103 Views
Slider
This is a migrated thread and some comments may be shown as answers.
Richard Gnyla
Top achievements
Rank 1
Richard Gnyla asked on 26 Jan 2010, 08:15 PM
Hi

I need the slider to increment in 0.5 steps, it does not matter to show 0.5, 1, 1.5 in the ticks but is it possible to increment in between, so 0.5, 1, 1.5.

Also, is it possible so the drag handle to stop at 0.5 and cannot go to 0?

Many thanks.

Richard

1 Answer, 1 is accepted

Sort by
0
Tsvetie
Telerik team
answered on 29 Jan 2010, 09:11 AM
Hi Richard Gnyla,
The slider control supports only values of type integer. Its Value, SelectionStart, SelectionEnd, MinimumValue and MaximumValue are of type int and that is why you cannot achieve the described result with our control.

You can use the following approach to mimic the behavior using RadSlider:
  • Set MinimumValue=5 and SmallChange=5
  • When you get the value of the slider, divide it by 10 and use the result of the division instead of the value of the slider.
  • In case you need to show ticks for the values of the slider, you should use ItemType=None and prepare an image with all the ticks for the slider. You can position that image above/below/next to the slider with CSS.

All the best,
Tsvetie
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Slider
Asked by
Richard Gnyla
Top achievements
Rank 1
Answers by
Tsvetie
Telerik team
Share this question
or