New to Telerik UI for ASP.NET AJAX? Start a free 30-day trial

Telerik RadSlider is a flexible UI component that allows users to select a value from a defined range using a smooth or step-based slider.

Definition

Namespace:Telerik.Web.UI

Assembly:Telerik.Web.UI.dll

Syntax:

C#
[RequiredScript(typeof(jQueryPlugins))]
[RequiredScript(typeof(ResizeExtender))]
[RequiredScript(typeof(AnimationFramework))]
[RequiredScript(typeof(MaterialRipple))]
[ClientScriptResource("Telerik.Web.UI.RadSlider", "Telerik.Web.UI.Slider.RadSliderScripts.js")]
[EmbeddedSkin("Slider")]
[EmbeddedSkin("Slider", "Default")]
[RequiredCss("Telerik.Web.UI.Skins.Common.fonticons.css", RenderMode.Lightweight, typeof(RadSlider))]
[RequiredCss("Telerik.Web.UI.Skins.Common.MaterialRipple.css", RenderMode.Lightweight, typeof(RadButton))]
[TelerikToolboxCategory("Miscellaneous")]
[ToolboxBitmap(typeof(RadSlider), "Toolbox.Icons.Slider.png")]
public class RadSlider : ControlItemContainer, IComponent, IDisposable, IParserAccessor, IUrlResolutionService, IDataBindingsAccessor, IControlBuilderAccessor, IControlDesignerAccessor, IExpressionsAccessor, IAttributeAccessor, IScriptControl, IControlResolver, IPostBackDataHandler, ISkinnableControl, IControl, IFeatureGroup, INamingContainer, IXmlSerializable, IControlItemContainer, IPostBackEventHandler

Inheritance: objectControlWebControlBaseDataBoundControlDataBoundControlRadDataBoundControlControlItemContainerRadSlider...

Implements: IAttributeAccessorIComponentIControlIControlBuilderAccessorIControlDesignerAccessorIControlItemContainerIControlResolverIDataBindingsAccessorIDisposableIExpressionsAccessorIFeatureGroupINamingContainerIParserAccessorIPostBackDataHandlerIPostBackEventHandlerIScriptControlISkinnableControlIUrlResolutionServiceIXmlSerializable...

Inherited Members ControlItemContainer.PrepareForDataBinding()ControlItemContainer.GetXml()ControlItemContainer.LoadXml(string)ControlItemContainer.CreateItem(ClientStateLogEntry)ControlItemContainer.RaiseTemplateNeeded(ControlItem)ControlItemContainer.FindChild<TControlItem>(Predicate<TControlItem>)ControlItemContainer.GetAllChildren<TControlItem>()ControlItemContainer.FindChildByValue<TControlItem>(string)ControlItemContainer.FindChildByValue<TControlItem>(string, bool)ControlItemContainer.FindChildByText<TControlItem>(string)ControlItemContainer.FindChildByText<TControlItem>(string, bool)ControlItemContainer.FindChildByAttribute<TControlItem>(string, string)ControlItemContainer.InitializeItem(ControlItem)ControlItemContainer.ReadXml(XmlReader)ControlItemContainer.GetItemTypeFromXmlTagName(string)ControlItemContainer.ReadXmlForChildren(XmlReader)ControlItemContainer.WriteXml(XmlWriter)ControlItemContainer.WriteXmlForChildren(XmlWriter)ControlItemContainer.GetXml(XmlSerializer, TextWriter)ControlItemContainer.LoadXml(ControlItemContainer)ControlItemContainer.LoadViewState(object)ControlItemContainer.SaveViewState()ControlItemContainer.TrackViewState()ControlItemContainer.FindItemByHierarchicalIndex(string)ControlItemContainer.GetPostbackEventReference()ControlItemContainer.DataTextFieldControlItemContainer.DataValueFieldControlItemContainer.DataTextFormatStringControlItemContainer.ValidationGroupControlItemContainer.PostBackUrlControlItemContainer.CausesValidationControlItemContainer.KeyboardNavigationSettingsControlItemContainer.TemplateControlItemContainer.ChildrenDataBoundControl.OnCreatingModelDataSource(CreatingModelDataSourceEventArgs)DataBoundControl.CreateDataSourceSelectArguments()DataBoundControl.GetData()DataBoundControl.GetDataSource()DataBoundControl.MarkAsDataBound()DataBoundControl.OnDataPropertyChanged()DataBoundControl.OnDataSourceViewChanged(object, EventArgs)DataBoundControl.OnLoad(EventArgs)DataBoundControl.OnPagePreLoad(object, EventArgs)DataBoundControl.PerformSelect()DataBoundControl.ValidateDataSource(object)DataBoundControl.DataMemberDataBoundControl.IsUsingModelBindersDataBoundControl.SelectMethodDataBoundControl.DataSourceIDDataBoundControl.DataSourceObjectDataBoundControl.SelectArgumentsDataBoundControl.CreatingModelDataSourceDataBoundControl.CallingDataMethodsBaseDataBoundControl.ConfirmInitState()BaseDataBoundControl.DataBind()BaseDataBoundControl.EnsureDataBound()BaseDataBoundControl.OnDataBound(EventArgs)BaseDataBoundControl.OnInit(EventArgs)BaseDataBoundControl.OnPreRender(EventArgs)BaseDataBoundControl.DataSourceBaseDataBoundControl.InitializedBaseDataBoundControl.IsBoundUsingDataSourceIDBaseDataBoundControl.IsDataBindingAutomaticBaseDataBoundControl.SupportsDisabledAttributeBaseDataBoundControl.RequiresDataBindingBaseDataBoundControl.DataBoundWebControl.ApplyStyle(Style)WebControl.CopyBaseAttributes(WebControl)WebControl.MergeStyle(Style)WebControl.Render(HtmlTextWriter)WebControl.RenderBeginTag(HtmlTextWriter)WebControl.RenderEndTag(HtmlTextWriter)WebControl.AccessKeyWebControl.AttributesWebControl.BackColorWebControl.BorderColorWebControl.BorderWidthWebControl.BorderStyleWebControl.ControlStyleWebControl.ControlStyleCreatedWebControl.CssClassWebControl.DisabledCssClassWebControl.StyleWebControl.EnabledWebControl.EnableThemingWebControl.FontWebControl.ForeColorWebControl.HasAttributesWebControl.IsEnabledWebControl.SkinIDWebControl.TabIndexWebControl.TagNameWebControl.ToolTipControl.ResolveAdapter()Control.HasEvents()Control.GetRouteUrl(object)Control.GetRouteUrl(string, object)Control.GetRouteUrl(RouteValueDictionary)Control.GetRouteUrl(string, RouteValueDictionary)Control.GetUniqueIDRelativeTo(Control)Control.ApplyStyleSheetSkin(Page)Control.OnDataBinding(EventArgs)Control.DataBind(bool)Control.DataBindChildren()Control.AddParsedSubObject(object)Control.EnsureID()Control.ClearChildState()Control.ClearChildControlState()Control.ClearChildViewState()Control.ClearEffectiveClientIDMode()Control.ClearCachedClientID()Control.Focus()Control.LoadControlState(object)Control.MapPathSecure(string)Control.OpenFile(string)Control.BuildProfileTree(string, bool)Control.SaveControlState()Control.RenderChildren(HtmlTextWriter)Control.RenderControl(HtmlTextWriter)Control.RenderControl(HtmlTextWriter, ControlAdapter)Control.OnUnload(EventArgs)Control.Dispose()Control.RaiseBubbleEvent(object, EventArgs)Control.OnBubbleEvent(object, EventArgs)Control.AddedControl(Control, int)Control.CreateControlCollection()Control.CreateChildControls()Control.ResolveUrl(string)Control.ResolveClientUrl(string)Control.FindControl(string)Control.FindControl(string, int)Control.GetDesignModeState()Control.HasControls()Control.IsLiteralContent()Control.EnsureChildControls()Control.RemovedControl(Control)Control.SetDesignModeState(IDictionary)Control.SetRenderMethodDelegate(RenderMethod)Control.ClientIDModeControl.ClientIDControl.ClientIDSeparatorControl.ContextControl.AdapterControl.DesignModeControl.EventsControl.IDControl.IsChildControlStateClearedControl.EnableViewStateControl.ViewStateModeControl.IsViewStateEnabledControl.NamingContainerControl.IdSeparatorControl.LoadViewStateByIDControl.PageControl.RenderingCompatibilityControl.TemplateControlControl.ParentControl.TemplateSourceDirectoryControl.AppRelativeTemplateSourceDirectoryControl.SiteControl.VisibleControl.UniqueIDControl.HasChildViewStateControl.ControlsControl.ValidateRequestModeControl.ViewStateControl.ViewStateIgnoresCaseControl.ChildControlsCreatedControl.IsTrackingViewStateControl.DisposedControl.DataBindingControl.InitControl.LoadControl.PreRenderControl.Unloadobject.ToString()object.Equals(object)object.Equals(object, object)object.ReferenceEquals(object, object)object.GetHashCode()object.GetType()object.MemberwiseClone()...

Constructors

C#
public RadSlider()

Properties

Get/Set the length of the animation

C#
[ClientControlProperty]
public int AnimationDuration { get; set; }

Gets/Sets a value indicating whether the DataBound items should be appended to the Slider Items collection, or the collection should be cleared before creating the DataBound items.

C#
public override bool AppendDataBoundItems { get; set; }

Overrides: ControlItemContainer.AppendDataBoundItems

True to cause a postback on value change.

C#
[ClientControlProperty]
[ClientPropertyName("_autoPostBack")]
public bool AutoPostBack { get; set; }

The CssClass property will now be used instead of the former Skin and will be modified in AddAttributesToRender()

C#
protected override string CssClassFormatString { get; }

Overrides: RadDataBoundControl.CssClassFormatString

Example:
C#
protected override string CssClassFormatString
{
       get
       {
           return "RadDock RadDock_{0} rdWTitle rdWFooter";
       }
}

Gets or sets the value of RadSlider in a database-friendly way.

C#
[Browsable(false)]
[TypeConverter(typeof(DecimalConverter))]
[Bindable(true, BindingDirection.TwoWay)]
public object DbValue { get; set; }
Property Value:

A decimal object that represents the value. The default value is 0m.

This property behaves exactly as the Value property. The only difference is that it will not throw an exception if the new value is null or DBNull. Setting a null value will revert the selected value to 0m.

Example:
cs-api-definition
private void Page_Load(object sender, System.EventArgs e)
{
RadSlider1.DbValue = tableRow["SliderValue"];
}

Gets or sets the text for the decrease handle

C#
[ClientControlProperty]
[ClientPropertyName("_decreaseText")]
public string DecreaseText { get; set; }

Gets or sets the text for the increase handle

C#
[ClientControlProperty]
[ClientPropertyName("_dragText")]
public string DragText { get; set; }

Get/Set the EnableDragRange of the slider

C#
[ClientControlProperty]
public bool EnableDragRange { get; set; }

Gets or sets a value, indicating whether the HTML of the control will be output from the server or created with client-side code.

C#
[ClientControlProperty]
[ClientPropertyName("_enableServerSideRendering")]
public bool EnableServerSideRendering { get; set; }

Get/Set the Height of the slider including the decrease and increase handles.

C#
[ClientControlProperty]
[ClientPropertyName("_height")]
public override Unit Height { get; set; }

Overrides: RadDataBoundControl.Height

Gets or sets the text for the increase handle

C#
[ClientControlProperty]
[ClientPropertyName("_increaseText")]
public string IncreaseText { get; set; }

Get/Set the IsDirectionReversed of the slider

C#
[ClientControlProperty]
public bool IsDirectionReversed { get; set; }

Get/Set the IsSelectionRangeEnabled of the slider

C#
[ClientControlProperty]
public bool IsSelectionRangeEnabled { get; set; }

Gets the object through which the user should provide the binding information about the slider items.

C#
[PersistenceMode(PersistenceMode.InnerProperty)]
public SliderItemBinding ItemBinding { get; }

Gets a RadSliderItemCollection object that contains the items of the current RadSlider control.

C#
[PersistenceMode(PersistenceMode.InnerProperty)]
public RadSliderItemCollection Items { get; }
Property Value:

A RadSliderItemCollection that contains the items of the current RadSlider control. By default the collection is empty (RadSlider is a numeric slider).

Use the Items property to access the child items of RadSlider You can add, remove or modify items from the Items collection.

Get/Set the ItemType of the slider items

C#
[ClientControlProperty]
public SliderItemType ItemType { get; set; }

Get/Set the delta with which the value will change when user click on the track

C#
public decimal LargeChange { get; set; }

Get/Set the length of the slider including the decrease and increase handles.

C#
[Browsable(false)]
[Obsolete("Please use the Width and Height properties of the RadSlider.")]
public int Length { get; set; }

If the slider is horizontal the width will be set, otherwise the height will be set.

Get/Set the LiveDrag of the slider

C#
[ClientControlProperty]
public bool LiveDrag { get; set; }

Get/Set the max value of the slider

C#
public decimal MaximumValue { get; set; }

Get/Set the min value of the slider

C#
public decimal MinimumValue { get; set; }
C#
[Browsable(false)]
[Obsolete("This property is now obsolete. Please use the OnClientValueChanging property instead.", false)]
public virtual string OnClientBeforeValueChange { get; set; }

Gets or sets a value indicating the client-side event handler that is called after the Slider is databound.

C#
[ClientControlEvent]
[ClientPropertyName("dataBound")]
public virtual string OnClientDataBound { get; set; }
Property Value:

A string specifying the name of the JavaScript function that will handle the event. The default value is empty string.

If specified, the OnClientDataBound client-side event handler is called after the Slider is databound. Two parameters are passed to the handler:

  • sender, the RadSlider object.
  • args.

This event cannot be cancelled.

Example:
C#
The following example demonstrates how to use the
<strong>OnClientDataBound</strong> property.

<p>
    <div class="LanguageSpecific" name="Code_VB">
        &lt;script type="text/javascript"&gt;<br />
         function OnClientDataBoundHandler(sender, args)<br />
         {<br />
         var slider = sender;<br />
         }<br />
        &lt;/script&gt;
    </div>
    <div class="LanguageSpecific" name="Code_VB">
        &lt;telerik:RadSlider ID="RadSlider1"<br />
         runat= "server"<br />
        <strong>OnClientDataBound="OnClientDataBoundHandler"</strong>&gt;<br />
        ....<br />
        &lt;/telerik:RadSlider&gt;
    </div>
</p>

Gets or sets a value indicating the client-side event handler that is called before a Slider item is databound.

C#
[ClientControlEvent]
[ClientPropertyName("itemDataBinding")]
public virtual string OnClientItemDataBinding { get; set; }
Property Value:

A string specifying the name of the JavaScript function that will handle the event. The default value is empty string.

If specified, the OnClientItemDataBinding client-side event handler is called before a Slider item is databound. Two parameters are passed to the handler:

  • sender, the RadSlider object.
  • args.

This event can be cancelled.

Example:
C#
The following example demonstrates how to use the
<strong>OnClientItemDataBinding</strong> property.

<p>
    <div class="LanguageSpecific" name="Code_VB">
        &lt;script type="text/javascript"&gt;<br />
         function OnClientItemDataBindingHandler(sender, args)<br />
         {<br />
         var slider = sender;<br />
         }<br />
        &lt;/script&gt;
    </div>
    <div class="LanguageSpecific" name="Code_VB">
        &lt;telerik:RadSlider ID="RadSlider1"<br />
         runat= "server"<br />
        <strong>OnClientItemDataBinding="OnClientItemDataBindingHandler"</strong>&gt;<br />
        ....<br />
        &lt;/telerik:RadSlider&gt;
    </div>
</p>

Gets or sets a value indicating the client-side event handler that is called after a Slider item is databound.

C#
[ClientControlEvent]
[ClientPropertyName("itemDataBound")]
public virtual string OnClientItemDataBound { get; set; }
Property Value:

A string specifying the name of the JavaScript function that will handle the event. The default value is empty string.

If specified, the OnClientItemDataBound client-side event handler is called after a Slider item is databound. Two parameters are passed to the handler:

  • sender, the RadSlider object.
  • args.

This event cannot be cancelled.

Example:
C#
The following example demonstrates how to use the
<strong>OnClientItemDataBound</strong> property.

<p>
    <div class="LanguageSpecific" name="Code_VB">
        &lt;script type="text/javascript"&gt;<br />
         function OnClientItemDataBoundHandler(sender, args)<br />
         {<br />
         var slider = sender;<br />
         }<br />
        &lt;/script&gt;
    </div>
    <div class="LanguageSpecific" name="Code_VB">
        &lt;telerik:RadSlider ID="RadSlider1"<br />
         runat= "server"<br />
        <strong>OnClientItemDataBound="OnClientItemDataBoundHandler"</strong>&gt;<br />
        ....<br />
        &lt;/telerik:RadSlider&gt;
    </div>
</p>

Gets or sets a value indicating the client-side event handler that is called when the items of the RadSlider control are created.

C#
[ClientControlEvent]
[ClientPropertyName("itemsCreated")]
public virtual string OnClientItemsCreated { get; set; }
Property Value:

A string specifying the name of the JavaScript function that will handle the event. The default value is empty string.

Two parameters are passed to the handler:

  • sender, the RadSlider object.
  • args.

This event cannot be cancelled.

Example:
C#
The following example demonstrates how to use the
<strong>OnClientItemsCreated</strong> property.

<p>
    <div class="LanguageSpecific" name="Code_VB">
        &lt;script type="text/javascript"&gt;<br />
         function OnClientItemsCreated(sender, args)<br />
         {<br />
         var slider = sender;<br />
         }<br />
        &lt;/script&gt;
    </div>
    <div class="LanguageSpecific" name="Code_VB">
        &lt;telerik:RadSlider ID="RadSlider1"<br />
         runat= "server"<br />
        <strong>OnClientItemsCreated="OnClientItemsCreated"</strong>&gt;<br />
        ....<br />
        &lt;/telerik:RadSlider&gt;
    </div>
</p>

Gets or sets a value indicating the client-side event handler that is called when the RadSlider control is initialized.

C#
[ClientControlEvent]
[ClientPropertyName("load")]
public virtual string OnClientLoad { get; set; }
Property Value:

A string specifying the name of the JavaScript function that will handle the event. The default value is empty string.

Two parameters are passed to the handler:

  • sender, the RadSlider object.
  • args.

This event cannot be cancelled.

Example:
C#
The following example demonstrates how to use the
<strong>OnClientLoad</strong> property.

<p>
    <div class="LanguageSpecific" name="Code_VB">
        &lt;script type="text/javascript"&gt;<br />
         function OnClientLoad(sender, args)<br />
         {<br />
         var slider = sender;<br />
         }<br />
        &lt;/script&gt;
    </div>
    <div class="LanguageSpecific" name="Code_VB">
        &lt;telerik:RadSlider ID="RadSlider1"<br />
         runat= "server"<br />
        <strong>OnClientLoad="OnClientLoad"</strong>&gt;<br />
        ....<br />
        &lt;/telerik:RadSlider&gt;
    </div>
</p>
C#
[Browsable(false)]
[Obsolete("This property is now obsolete. Please use the OnClientLoad property instead.", false)]
public virtual string OnClientLoaded { get; set; }

Gets or sets a value indicating the client-side event handler that is called while the handle is being slided.

C#
[ClientControlEvent]
[ClientPropertyName("slide")]
public virtual string OnClientSlide { get; set; }
Property Value:

A string specifying the name of the JavaScript function that will handle the event. The default value is empty string.

If specified, the OnClientSlide client-side event handler that is called while the handle is being slided. Two parameters are passed to the handler:

  • sender, the RadSlider object.
  • args.

This event cannot be cancelled.

Example:
C#
The following example demonstrates how to use the
<strong>OnClientSlide</strong> property.

<p>
    <div class="LanguageSpecific" name="Code_VB">
        &lt;script type="text/javascript"&gt;<br />
         function OnSlidingHandler(sender, args)<br />
         {<br />
         var slider = sender;<br />
         }<br />
        &lt;/script&gt;
    </div>
    <div class="LanguageSpecific" name="Code_VB">
        &lt;telerik:RadSlider ID="RadSlider1"<br />
         runat= "server"<br />
        <strong>OnClientSlide="OnSlidingHandler"</strong>&gt;<br />
        ....<br />
        &lt;/telerik:RadSlider&gt;
    </div>
</p>

Gets or sets a value indicating the client-side event handler that is called when slide has ended.

C#
[ClientControlEvent]
[ClientPropertyName("slideEnd")]
public virtual string OnClientSlideEnd { get; set; }
Property Value:

A string specifying the name of the JavaScript function that will handle the event. The default value is empty string.

If specified, the OnClientSlideEnd client-side event handler that is called when slide has ended. Two parameters are passed to the handler:

  • sender, the RadSlider object.
  • args.

This event cannot be cancelled.

Example:
C#
The following example demonstrates how to use the
<strong>OnClientSlideEnd</strong> property.

<p>
    <div class="LanguageSpecific" name="Code_VB">
        &lt;script type="text/javascript"&gt;<br />
         function OnSlideHandler(sender, args)<br />
         {<br />
         var slider = sender;<br />
         }<br />
        &lt;/script&gt;
    </div>
    <div class="LanguageSpecific" name="Code_VB">
        &lt;telerik:RadSlider ID="RadSlider1"<br />
         runat= "server"<br />
        <strong>OnClientSlideEnd="OnSlideHandler"</strong>&gt;<br />
        ....<br />
        &lt;/telerik:RadSlider&gt;
    </div>
</p>

Gets or sets a value indicating the client-side event handler that is called while the user is sliding the selected region, thus changing the both SelectionStart and SelectionEnd values.

C#
[ClientControlEvent]
[ClientPropertyName("slideRange")]
public virtual string OnClientSlideRange { get; set; }
Property Value:

A string specifying the name of the JavaScript function which will handle the event. The default value is empty string.

If specified, the OnClientSlideRange client-side event handler that is called while the selected region is being slided. Two parameters are passed to the handler:

  • sender, the RadSlider object.
  • args.

This event cannot be cancelled.

Example:
C#
The following example demonstrates how to use the
<strong>OnClientSlideRange</strong> property.

<p>
    <div class="LanguageSpecific" name="Code_VB">
        &lt;script type="text/javascript"&gt;<br />
         function OnClientSlideRange(sender, args)<br />
         {<br />
         var slider = sender;<br />
         }<br />
        &lt;/script&gt;
    </div>
    <div class="LanguageSpecific" name="Code_VB">
        &lt;telerik:RadSlider ID="RadSlider1"<br />
         runat= "server"<br />
        <strong>OnClientSlideRange="OnClientSlideRange"</strong>&gt;<br />
        ....<br />
        &lt;/telerik:RadSlider&gt;
    </div>
</p>

Gets or sets a value indicating the client-side event handler that is called when the user releases the selected region of RadSlider, after dragging it, thus changing both SelectionStart and SelectionEnd values.

C#
[ClientControlEvent]
[ClientPropertyName("slideRangeEnd")]
public virtual string OnClientSlideRangeEnd { get; set; }
Property Value:

A string specifying the name of the JavaScript function that will handle the event. The default value is empty string.

If specified, the OnClientSlideRangeEnd client-side event handler that is called when slide has ended. Two parameters are passed to the handler:

  • sender, the RadSlider object.
  • args.

This event cannot be cancelled.

Example:
C#
The following example demonstrates how to use the
<strong>OnClientSlideRangeEnd</strong> property.

<p>
    <div class="LanguageSpecific" name="Code_VB">
        &lt;script type="text/javascript"&gt;<br />
         function OnClientSlideRangeEnd(sender, args)<br />
         {<br />
         var slider = sender;<br />
         }<br />
        &lt;/script&gt;
    </div>
    <div class="LanguageSpecific" name="Code_VB">
        &lt;telerik:RadSlider ID="RadSlider1"<br />
         runat= "server"<br />
        <strong>OnClientSlideRangeEnd="OnClientSlideRangeEnd"</strong>&gt;<br />
        ....<br />
        &lt;/telerik:RadSlider&gt;
    </div>
</p>

Gets or sets a value indicating the client-side event handler that is called just before the user starts sliding the selected region of RadSlider, thus changing both SelectionStart and SelectionEnd values.

C#
[ClientControlEvent]
[ClientPropertyName("slideRangeStart")]
public virtual string OnClientSlideRangeStart { get; set; }
Property Value:

A string specifying the name of the JavaScript function which will handle the event. The default value is empty string.

If specified, the OnClientSlideRangeStart client-side event handler is called before the user starts sliding the selected region. Two parameters are passed to the handler:

  • sender, the RadSlider object.
  • args.

This event cannot be cancelled.

Example:
C#
The following example demonstrates how to use the
<strong>OnClientSlideRangeStart</strong> property.

<p>
    <div class="LanguageSpecific" name="Code_VB">
        &lt;script type="text/javascript"&gt;<br />
         function OnClientSlideRangeStart(sender, args)<br />
         {<br />
         var slider = sender;<br />
         }<br />
        &lt;/script&gt;
    </div>
    <div class="LanguageSpecific" name="Code_VB">
        &lt;telerik:RadSlider ID="RadSlider1"<br />
         runat= "server"<br />
        <strong>OnClientSlideRangeStart="OnClientSlideRangeStart"</strong>&gt;<br />
        ....<br />
        &lt;/telerik:RadSlider&gt;
    </div>
</p>

Gets or sets a value indicating the client-side event handler that is called before the sliding is started.

C#
[ClientControlEvent]
[ClientPropertyName("slideStart")]
public virtual string OnClientSlideStart { get; set; }
Property Value:

A string specifying the name of the JavaScript function that will handle the event. The default value is empty string.

If specified, the OnClientSlideStart client-side event handler is called before the sliding is started. Two parameters are passed to the handler:

  • sender, the RadSlider object.
  • args.

This event cannot be cancelled.

Example:
C#
The following example demonstrates how to use the
<strong>OnClientSlideStart</strong> property.

<p>
    <div class="LanguageSpecific" name="Code_VB">
        &lt;script type="text/javascript"&gt;<br />
         function OnSlideBeginHandler(sender, args)<br />
         {<br />
         var slider = sender;<br />
         }<br />
        &lt;/script&gt;
    </div>
    <div class="LanguageSpecific" name="Code_VB">
        &lt;telerik:RadSlider ID="RadSlider1"<br />
         runat= "server"<br />
        <strong>OnClientSlideStart="OnSlideBeginHandler"</strong>&gt;<br />
        ....<br />
        &lt;/telerik:RadSlider&gt;
    </div>
</p>
C#
[Browsable(false)]
[Obsolete("This property is now obsolete. Please use the OnClientValueChanged property instead.", false)]
public virtual string OnClientValueChange { get; set; }

Gets or sets a value indicating the client-side event handler that is called when the value of the slider has been changed.

C#
[ClientControlEvent]
[ClientPropertyName("valueChanged")]
public virtual string OnClientValueChanged { get; set; }
Property Value:

A string specifying the name of the JavaScript function that will handle the event. The default value is empty string.

Two parameters are passed to the handler:

  • sender, the RadSlider object.
  • args.

This event cannot be cancelled.

Example:
C#
The following example demonstrates how to use the <strong>OnClientValueChanged</strong> property.

<p>
    <div class="LanguageSpecific" name="Code_VB">
        &lt;script type="text/javascript"&gt;<br />
         function OnClientValueChanged(sender, args)<br />
         {<br />
         var slider = sender;<br />
         }<br />
        &lt;/script&gt;
    </div>
    <div class="LanguageSpecific" name="Code_VB">
        &lt;telerik:RadSlider ID="RadSlider1"<br />
         runat= "server"<br />
        <strong>OnClientValueChanged="OnClientValueChanged"</strong>&gt;<br />
        ....<br />
        &lt;/telerik:RadSlider&gt;
    </div>
</p>

Gets or sets a value indicating the client-side event handler that is called just before the value of the slider changes.

C#
[ClientControlEvent]
[ClientPropertyName("valueChanging")]
public virtual string OnClientValueChanging { get; set; }
Property Value:

A string specifying the name of the JavaScript function that will handle the event. The default value is empty string.

Two parameters are passed to the handler:

  • sender, the RadSlider object.
  • args.

This event can be cancelled.

Example:
C#
The following example demonstrates how to use the <strong>OnClientValueChanging</strong> property.

<p>
    <div class="LanguageSpecific" name="Code_VB">
        &lt;script type="text/javascript"&gt;<br />
         function OnClientValueChanging(sender, args)<br />
         {<br />
         var slider = sender;<br />
         }<br />
        &lt;/script&gt;
    </div>
    <div class="LanguageSpecific" name="Code_VB">
        &lt;telerik:RadSlider ID="RadSlider1"<br />
         runat= "server"<br />
        <strong>OnClientValueChanging="OnClientValueChanging"</strong>&gt;<br />
        ....<br />
        &lt;/telerik:RadSlider&gt;
    </div>
</p>

Get/Set orientation of the slider

C#
[ClientControlProperty]
public Orientation Orientation { get; set; }

Gets the Value of the selected item in case ItemType of the RadSlider control equals SliderItemType.Item.

C#
[Browsable(false)]
public int SelectedIndex { get; set; }
Property Value:

The Value of the selected item. If there are no items in the Items collection of the RadSlider control, returns empty string.

Gets a RadSliderItem object that represents the selected item in the RadSlider control in case ItemType of the control equals SliderItemType.Item.

C#
[Browsable(false)]
public RadSliderItem SelectedItem { get; }
Property Value:

A RadSliderItem object that represents the selected item. If there are no items in the Items collection of the RadSlider control, returns null.

Gets a collection of RadSliderItem objects that represent the items in the RadSlider control that are currently selected in case ItemType of the control equals SliderItemType.Item.

C#
[Browsable(false)]
public RadSliderItemCollection SelectedItems { get; }
Property Value:

A RadSliderItemCollection containing the selected items.

Get/Set the position value of the slider, from where the selection region will begin

C#
public decimal SelectedRegionStartValue { get; set; }

Gets the Value of the selected item in case ItemType of the RadSlider control equals SliderItemType.Item.

C#
[Browsable(false)]
public string SelectedValue { get; set; }
Property Value:

The Value of the selected item. If there are no items in the Items collection of the RadSlider control, returns empty string.

Get/Set the SelectionEnd of the slider

C#
public decimal SelectionEnd { get; set; }

Get/Set the SelectionStart of the slider

C#
public decimal SelectionStart { get; set; }

Show/Hide the decrease handle

C#
[ClientControlProperty]
public bool ShowDecreaseHandle { get; set; }

Show/Hide the drag handle

C#
[ClientControlProperty]
public bool ShowDragHandle { get; set; }

Show/Hide the increase handle

C#
[ClientControlProperty]
public bool ShowIncreaseHandle { get; set; }

Get/Set the step with which the slider value will change

C#
public decimal SmallChange { get; set; }
C#
protected override bool SupportsRenderingMode { get; }

Overrides: RadDataBoundControl.SupportsRenderingMode

C#
protected override HtmlTextWriterTag TagKey { get; }

Overrides: ControlItemContainer.TagKey

Get/Set the InteractionMode of the slider thumbs

C#
[ClientControlProperty]
public SliderThumbsInteractionMode ThumbsInteractionMode { get; set; }

Enable/Disable whether the mouse wheel should be handled

C#
[ClientControlProperty]
public bool TrackMouseWheel { get; set; }

Get/Set the TrackPosition of the slider track

C#
[ClientControlProperty]
public SliderTrackPosition TrackPosition { get; set; }

Get/Set the value of the slider

C#
public decimal Value { get; set; }

Get/Set the Width of the slider including the decrease and increase handles.

C#
[ClientControlProperty]
[ClientPropertyName("_width")]
public override Unit Width { get; set; }

Overrides: RadDataBoundControl.Width

Methods

Adds HTML attributes and styles that need to be rendered to the specified HtmlTextWriterTag. This method is used primarily by control developers.

C#
protected override void AddAttributesToRender(HtmlTextWriter writer)
Parameters:writerHtmlTextWriter

A HtmlTextWriter that represents the output stream to render HTML content on the client.

Overrides: RadDataBoundControl.AddAttributesToRender(HtmlTextWriter)

Binds the Slider control to a IEnumerable data source

C#
public void BindToEnumerableData(IEnumerable dataSource)
Parameters:dataSourceIEnumerable

IEnumerable data source

Code moved into this method from OnPreRender to make sure it executed when the framework skips OnPreRender() for some reason

C#
protected override void ControlPreRender()

Overrides: RadDataBoundControl.ControlPreRender()

C#
protected override ControlItemCollection CreateChildItemCollection()
Returns:

ControlItemCollection

Overrides: ControlItemContainer.CreateChildItemCollection()

C#
protected override Style CreateControlStyle()
Returns:

Style

Overrides: WebControl.CreateControlStyle()

C#
protected override ControlItem CreateItem()
Returns:

ControlItem

Overrides: ControlItemContainer.CreateItem()

C#
protected override void DescribeComponent(IScriptDescriptor descriptor)
Parameters:descriptorIScriptDescriptor

Overrides: ControlItemContainer.DescribeComponent(IScriptDescriptor)

Loads the client state data

C#
protected override void LoadClientState(Dictionary<string, object> clientState)
Parameters:clientStateDictionary<string, object>

Overrides: RadDataBoundControl.LoadClientState(Dictionary<string, object>)

Executed when post data is loaded from the request

C#
protected override bool LoadPostData(string postDataKey, NameValueCollection postCollection)
Parameters:postDataKeystringpostCollectionNameValueCollectionReturns:

bool

Overrides: RadDataBoundControl.LoadPostData(string, NameValueCollection)

Raises the ItemDataBound event. This event is raised per item for a Data-Bound RadSlider.

C#
protected virtual void OnItemDataBound(RadSliderItemEventArgs e)
Parameters:eRadSliderItemEventArgs

Event arguments instance containing a reference to the currently bound item

Gets or sets a value indicating the server-side event handler that is called when the value of the slider has been changed.

C#
protected virtual void OnValueChanged(EventArgs e)
Parameters:eEventArgs

If specified, the OnValueChanged event handler that is called when the value of the slider has been changed. Two parameters are passed to the handler:

  • sender, the RadSlider object.
  • args.

This event cannot be cancelled.

Example:
C#
The following example demonstrates how to use the
<strong>OnValueChanged</strong> property.

<p>
    <div class="LanguageSpecific" name="Code_VB">
        &lt;telerik:RadSlider ID="RadSlider1"<br />
         runat= "server"<br />
        <strong>OnValueChanged="OnValueChanged"</strong>&gt;<br />
        ....<br />
        &lt;/telerik:RadSlider&gt;
    </div>
</p>
C#
protected override void PerformDataBinding(IEnumerable data)
Parameters:dataIEnumerable

Overrides: ControlItemContainer.PerformDataBinding(IEnumerable)

C#
protected override void RaiseItemCreated(ControlItem item)
Parameters:itemControlItem

Overrides: ControlItemContainer.RaiseItemCreated(ControlItem)

C#
protected override void RaiseItemDataBound(ControlItem item)
Parameters:itemControlItem

Overrides: ControlItemContainer.RaiseItemDataBound(ControlItem)

Executed when post data changes should invoke a changed event

C#
protected override void RaisePostDataChangedEvent()

Overrides: RadDataBoundControl.RaisePostDataChangedEvent()

C#
protected override void RenderContents(HtmlTextWriter writer)
Parameters:writerHtmlTextWriter

Overrides: RadDataBoundControl.RenderContents(HtmlTextWriter)

C#
protected void RenderDragHandle(bool isEndDragHandle, HtmlTextWriter writer)
Parameters:isEndDragHandleboolwriterHtmlTextWriter
C#
protected void RenderIncreaseDecreaseHandle(bool decrease, HtmlTextWriter writer)
Parameters:decreaseboolwriterHtmlTextWriter
C#
protected void RenderItemsHTML(HtmlTextWriter writer)
Parameters:writerHtmlTextWriter
C#
protected void RenderTicksHTML(HtmlTextWriter writer)
Parameters:writerHtmlTextWriter
C#
protected void RenderWrapper(HtmlTextWriter writer)
Parameters:writerHtmlTextWriter

Events

C#
public event EventHandler ValueChanged
In this article
DefinitionConstructorsRadSlider()PropertiesAnimationDurationAppendDataBoundItemsAutoPostBackCssClassFormatStringDbValueDecreaseTextDragTextEnableDragRangeEnableServerSideRenderingHeightIncreaseTextIsDirectionReversedIsSelectionRangeEnabledItemBindingItemsItemTypeLargeChangeLengthLiveDragMaximumValueMinimumValueOnClientBeforeValueChangeOnClientDataBoundOnClientItemDataBindingOnClientItemDataBoundOnClientItemsCreatedOnClientLoadOnClientLoadedOnClientSlideOnClientSlideEndOnClientSlideRangeOnClientSlideRangeEndOnClientSlideRangeStartOnClientSlideStartOnClientValueChangeOnClientValueChangedOnClientValueChangingOrientationSelectedIndexSelectedItemSelectedItemsSelectedRegionStartValueSelectedValueSelectionEndSelectionStartShowDecreaseHandleShowDragHandleShowIncreaseHandleSmallChangeSupportsRenderingModeTagKeyThumbsInteractionModeTrackMouseWheelTrackPositionValueWidthMethodsAddAttributesToRender(HtmlTextWriter)BindToEnumerableData(IEnumerable)ControlPreRender()CreateChildItemCollection()CreateControlStyle()CreateItem()DescribeComponent(IScriptDescriptor)LoadClientState(Dictionary<string, object>)LoadPostData(string, NameValueCollection)OnItemDataBound(RadSliderItemEventArgs)OnValueChanged(EventArgs)PerformDataBinding(IEnumerable)RaiseItemCreated(ControlItem)RaiseItemDataBound(ControlItem)RaisePostDataChangedEvent()RenderContents(HtmlTextWriter)RenderDragHandle(bool, HtmlTextWriter)RenderIncreaseDecreaseHandle(bool, HtmlTextWriter)RenderItemsHTML(HtmlTextWriter)RenderTicksHTML(HtmlTextWriter)RenderWrapper(HtmlTextWriter)EventsValueChanged
Not finding the help you need?
Contact Support