Setting Slider Value

2 posts, 1 answers
  1. Ben
    Ben avatar
    31 posts
    Member since:
    Feb 2013

    Posted 14 Feb 2013 Link to this post


    Is it possible to set the value of RadSlider through JavaScript based on a value in my textbox?  When I enter some value in the textbox then the slider should be set accordingly and vice-versa.
  2. Answer
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 14 Feb 2013 Link to this post

    Hi Ben,

    It is possible to set the slider value through Javascript. Please have a look into the following code snippet to set the slider value from textbox as well as to set the textbox value from the slider. You can use the OnClientValueChanged event of the RadSlider to set the textbox value when the slider position is changed.

    <asp:TextBox ID="TextBox1" runat="server" onblur="myFunction()"></asp:TextBox>
    <telerik:RadSlider ID="RadSlider" runat="server" MinimumValue="0" MaximumValue="100"

    <script type="text/javascript">
        function OnClientValueChanged(sender, eventArgs) {
            document.getElementById("TextBox1").value = sender.get_value();
        function myFunction() {
            var slider = $find("<%= RadSlider.ClientID %>");

  3. DevCraft R3 2016 release webinar banner
Back to Top