Slider in RadToolbar :-( !!

2 posts, 0 answers
  1. PapaSmurf
    PapaSmurf avatar
    12 posts
    Member since:
    Apr 2005

    Posted 12 Jun 2008 Link to this post


    i'm using the slider in a radToolbar as toolbarbutton > Itemptemplate.
    Bu i can't set the value of the slider in javascript! 
    I use the following code to get the slider clientID in toolbartemplate item.
    The zoomslider is an object, but it throws an exception on get_value() or on set_Value..  (object doesn't support the property or method).

    var ZoomSlider = document.getElementById('<%=MapToolBar.FindItemByValue("MapSlider").FindControl("ZoomSlider").ClientID%>');

    if (ZoomSlider != null) {ZoomSlider .set_Value(17);}

    Please help?


  2. Svetlina Anati
    Svetlina Anati avatar
    2795 posts

    Posted 16 Jun 2008 Link to this post

    Hi BarbaPapa,

    I already answered your support ticket and for your convenience I am pasting my reply below.

    I examined your code and I noticed that you are using the built-in javascript function getElementById. It obtains a reference to an HTML element and in order to use the RadSlider's client-side methods you should reference the client object. This should be done by using the built-in ajax method $find.

    In order to achieve the desired behavior you should change your code in the following manner:

     var ZoomSlider = $find('[Your_Slider_ClientID]');   
               if (ZoomSlider != null)   
                  ZoomSlider .set_value(17);  

    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. DevCraft R3 2016 release webinar banner
Back to Top