New to Telerik UI for ASP.NET AJAX? Start a free 30-day trial
OnClientValueChanged
The OnClientValueChangedclient-side event occurs as the value property changes.
The event handler receives parameters:
-
The slider instance that fired the event.
-
Event arguments with the following properties:
-
get_oldValue: returns the slider Value just prior to the change.
-
get_newValue: returns the slider Value after the change.
-
The example below displays the new and old values.
ASP.NET
<script type="text/javascript">
function clientValueChange(sender, eventArgs)
{
var myDiv = document.getElementById("myDiv")
myDiv.innerHTML = "Old value is:" + eventArgs.get_oldValue()
+ " New value:" + sender.get_value();
}
</script>
<div id="myDiv"></div>
<telerik:RadSlider
ID="RadSlider1"
runat="server"
OnClientValueChanged="clientValueChange"
Skin="Mac"
/>