Telerik is a leading vendor of ASP.NET AJAX, ASP.NET MVC, Silverlight, WinForms and WPF controls and components, as well as .NET Reporting, .NET ORM , .NET CMS, Code Analysis, Mocking, Team Productivity and Automated Testing Tools. Building on its expertise in interface development and Microsoft technologies, Telerik helps customers build applications with unparalleled richness, responsiveness and interactivity. Telerik products help thousands of companies to be more productive and deliver reliable applications under budget and on time.
Version Q2 2011 released 07/12/2011
select

Slider / Slider Steps

Step settings
SmallChange:
LargeChange:
Value:
Step settings
SmallChange:
LargeChange:
Value:
Step settings
SmallChange:
LargeChange:
Value:

  • SmallChange and LargeChange property

    Using the SmallChange property, you can create a "discrete" slider which will change its value in the defined steps. For example if you have a slider with range from 0-100 and SmallChange set to 5, the values which the slider can display are 0, 5, 10, 15, ... 95, 100. By default the value of this property is set to 1.

    Using the LargeChange property you can define what should be the change in the value of the slider when the user clicks on the track. By default the LargeChange is set to 0. In this default mode the slider will automatically scroll to the value which has been clicked by the user.

Source Code

C# VB.NET
Show code in new window Demo isolation steps
  • <%@ Page Language="c#" AutoEventWireup="false" Inherits="Telerik.Web.Examples.Slider.SliderSteps.DefaultCS"
        CodeFile="DefaultCS.aspx.cs" %>

    <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
    <%@ Register TagPrefix="qsf" Namespace="Telerik.QuickStart" %>
    <%@ Register TagPrefix="qsf" TagName="Header" Src="~/Common/Header.ascx" %>
    <%@ Register TagPrefix="qsf" TagName="HeadTag" Src="~/Common/HeadTag.ascx" %>
    <%@ Register TagPrefix="qsf" TagName="Footer" Src="~/Common/Footer.ascx" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <qsf:HeadTag ID="Headtag1" runat="server" />
        <style type="text/css">
        fieldset
        {
            width:140px;
            margin-left:450px;
            margin-top:-90px;
            display:block;
        }
       
        .stepSettingWrapper
        {
            height:22px;
            position:relative;
        }
        </style>
    </head>
    <body class="BODY">
        <form id="Form1" method="post" runat="server">
            <qsf:Header ID="Header1" runat="server" NavigationLanguage="c#" />
            <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
            <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" DecoratedControls="All" />
                   
            <div style="padding-top:30px;">
                <telerik:RadSlider ID="RadSlider1" runat="server"
                    LargeChange="10" SmallChange="5"
                    Value="0" MinimumValue="-50" MaximumValue="50"
                    Width="400" Height="60"
                    ItemType="Tick" TrackPosition="TopLeft"
                    OnClientValueChanged="HandleValueChanged" />

                <fieldset title="Settings">
                    <legend>Step settings</legend>
                    <table style="margin-left:5px;margin-bottom:5px;">
                        <tr>
                            <td><strong>SmallChange:</strong></td>
                            <td><input type="text" readonly="readonly" value="5" style="width:30px;margin-left:5px;" /></td>
                        </tr>
                        <tr>
                            <td><strong>LargeChange:</strong></td>
                            <td><input type="text" readonly="readonly" value="10" style="width:30px;margin-left:5px;" /></td>
                        </tr>
                        <tr>
                            <td><strong>Value:</strong></td>
                            <td><input type="text" readonly="readonly" id="RadSlider1Value" value="0" style="width:30px;margin-left:5px;" /></td>
                        </tr>
                    </table>
                </fieldset>
            </div>
            
            <div style="padding-top:50px;">
                <telerik:RadSlider ID="RadSlider2" runat="server"
                    LargeChange="10" SmallChange="10"
                    Value="0" MinimumValue="-50" MaximumValue="50"
                    Width="400" Height="60"
                    ItemType="Tick" TrackPosition="TopLeft"
                    OnClientValueChanged="HandleValueChanged" />
                
                <fieldset title="Settings">
                    <legend>Step settings</legend>
                    <table style="margin-left:5px;margin-bottom:5px;">
                        <tr>
                            <td><strong>SmallChange:</strong></td>
                            <td><input type="text" readonly="readonly" value="10" style="width:30px;margin-left:5px;" /></td>
                        </tr>
                        <tr>
                            <td><strong>LargeChange:</strong></td>
                            <td><input type="text" readonly="readonly" value="10" style="width:30px;margin-left:5px;" /></td>
                        </tr>
                        <tr>
                            <td><strong>Value:</strong></td>
                            <td><input type="text" readonly="readonly" id="RadSlider2Value" value="0" style="width:30px;margin-left:5px;" /></td>
                        </tr>
                    </table>
                </fieldset>
            </div>
            
            <div style="padding-top:50px;">
                <telerik:RadSlider ID="RadSlider3" runat="server"
                    LargeChange="0" SmallChange="5"
                    Value="0" MinimumValue="-50" MaximumValue="50"
                    Width="400" Height="60"
                    ItemType="Tick" TrackPosition="TopLeft"
                    OnClientValueChanged="HandleValueChanged" />
                
                <fieldset title="Settings">
                    <legend>Step settings</legend>
                    <table style="margin-left:5px;margin-bottom:5px;">
                        <tr>
                            <td><strong>SmallChange:</strong></td>
                            <td><input type="text" readonly="readonly" value="5" style="width:30px;margin-left:5px;" /></td>
                        </tr>
                        <tr>
                            <td><strong>LargeChange:</strong></td>
                            <td><input type="text" readonly="readonly" value="0" style="width:30px;margin-left:5px;" /></td>
                        </tr>
                        <tr>
                            <td><strong>Value:</strong></td>
                            <td><input type="text" readonly="readonly" id="RadSlider3Value" value="0" style="width:30px;margin-left:5px;" /></td>
                        </tr>
                    </table>
                </fieldset>
            </div>

            <script type="text/javascript">
         function HandleValueChanged(sender, eventArgs)
         {
             $get(sender.get_id() + "Value").value = sender.get_value();
         }
            </script>

            <qsf:Footer runat="server" ID="Footer1" />
        </form>
    </body>
    </html>

Get more than expected!

 
 

Take your time to truly experience the power of RadControls for ASP.NET AJAX with a free 60-day trial backed up by Telerik’s unlimited dedicated support.

Download your RadControls for ASP.NET AJAX trial and jumpstart your development with the available Getting Started resources.

If you have any questions, do not hesitate to contact us at sales@telerik.com.

Copyright 2002-2024 © Telerik. All right reserved
Telerik Inc, 201 Jones Rd, Waltham, MA 02451