RadSlider draghandle rule

2 posts, 0 answers
  1. Fit2Page
    Fit2Page avatar
    468 posts
    Member since:
    Feb 2007

    Posted 05 May 2015 Link to this post

    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?



  2. Slav
    Slav avatar
    1359 posts

    Posted 07 May 2015 Link to this post

    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.


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

Back to Top