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


The OnClientValueChanging client-side event occurs before the value property changes.

The event handler receives parameters:

  1. The slider instance that fired the event.

  2. Event arguments with the following properties:

    • get_oldValue: returns the slider value just prior to the change.

    • get_newValue: returns the value that will be set after the change.

    • set_cancel: cancel the change of the value.

    • get_cancel: returns a boolean that indicates whether the change of the value is cancelled.

The example below displays the new and old values.

<script type="text/javascript">
function clientBeforeValueChange(sender, eventArgs)
    var myDiv = document.getElementById("myDiv");
    myDiv.innerHTML = "Old value is:" + eventArgs.get_oldValue() + " New value:" + eventArgs.get_newValue();

<div id="myDiv">

<telerik:radslider id="RadSlider1" runat="server" onclientvaluechanging="clientBeforeValueChange" />
In this article