New to Telerik UI for ASP.NET AJAX? Start a free 30-day trial
OnClientColorChange
The OnClientColorChange client-side event occurs when the user selects a color from the palette.
The event handler receives parameters:
-
The color picker instance that fired the event.
-
Event arguments with the following properties:
- get_oldValue: returns the selected color from just prior to the change.
The example below displays the new and old values.
ASP.NET
function colorChange(sender, eventArgs)
{
var myDiv = document.getElementById("myDiv");
myDiv.innerHTML = 'Color changed from ' + eventArgs.get_oldColor()
+ " to " + sender.get_selectedColor();
}
...
<telerik:RadColorPicker
ID="RadColorPicker1"
runat="server"
Preset="Standard"
OnClientColorChange="colorChange">
</telerik:RadColorPicker>