Slider: Client Side Width As Drag

1 posts, 0 answers
  1. Dave Myers
    Dave Myers avatar
    47 posts
    Member since:
    Sep 2008

    Posted 14 Oct 2009 Link to this post

    Thought I would share since I didn't see this posted anywhere.

    What I wanted to do was to increase the size of the slider, and maximum value as the user dragged the drag handle to the end of the slider.  If it was at the maximum value, it should increase the size of the slider to allow for more valus to be selected.
    server side:
    slider.Width = 365 
    slider.SmallChange = 1 
    slider.LargeChange = 1 
    slider.IsSelectionRangeEnabled = True 
    slider.SelectionStart = 0 
    slider.SelectionEnd = 360 
    slider.OnClientSlideEnd = "sliderEndSlide" 
    client side:
    function sliderEndSlide(sender, args) { 
            if (sender.get_selectionEnd() == sender.get_maximumValue()) { 
                sender.set_width(sender.get_maximumValue() + 28); 
                sender.set_maximumValue(sender.get_maximumValue() + 28); 
    this will increase the slider by 28 every time you put the slider handle at the maximum value.

Back to Top