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

RadSlider draghandle rule

1 Answer 7 Views
Slider
This is a migrated thread and some comments may be shown as answers.
Fit2Page
Top achievements
Rank 1
Iron
Veteran
Iron
Fit2Page asked on 05 May 2015, 11:48 AM

how could I program that the draghandle in a horizontal slider can only be moved one tick to the right?

 

So the moves to the left and multiple ticks to the right are blocked client side?

 

Marc

1 Answer, 1 is accepted

Sort by
0
Slav
Telerik team
answered on 07 May 2015, 08:51 AM
Hi Marc,

By default the drag handle of RadSlider is moved one tick at a time and the number of ticks and their type depend on the value of the SmallChange and LargeChange properties as described in the following demo: http://demos.telerik.com/aspnet-ajax/slider/examples/ticks/defaultcs.aspx

As for allowing the slider value only to be incremented, you can use the OnClientValueChanging event for this purpose: http://www.telerik.com/help/aspnet-ajax/slider-client-side-onclientvaluechanging.html. First, you can compare the results of the get_oldValue and the get_newValue method of the event arguments parameter. If the old value is greater than the new value of the slider (the value is decreased), you can call set_cancel(true) similarly to the example in the help article and the value of the slider will not change.

Regards,
Slav
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
Tags
Slider
Asked by
Fit2Page
Top achievements
Rank 1
Iron
Veteran
Iron
Answers by
Slav
Telerik team
Share this question
or