New to Telerik UI for ASP.NET AJAXStart a free 30-day trial

Events

OnValueChanged

The RadSlider control raises a server-side event, ValueChanged that fires when the user changes the Value with the mouse or mouse wheel. Set the AutoPostBack property True to raise the event right after the value is changed on the client. Retrieve the Value property within the ValueChanged event handler:

C#
protected void RadSlider1_ValueChanged(object sender, EventArgs e)
{
	Label1.Text = (sender as Telerik.Web.UI.RadSlider).Value.ToString();
} 

OnDataBound

The OnDataBound sever-side event of the RadSlider fires when all its items are loaded from a specified data source. You can use this event when you are data binding the RadSlider and you want to execute logic that relies on already loaded items. The example below demonstrates setting the fourth item of a data-bound RadSlider as a selected item:

C#
protected void OnDataBound(object sender, EventArgs e)
{
	if (!IsPostBack)
	{
		slider.SelectedValue = slider.Items[3].Value;
	}
}

See Also