RadControls for ASP.NET AJAX The OnEnumerationChanged client-side event handler is called when the value of an enumerated mask part is set. This event occurs even if the setting of the enumerated value does not result in a change (for example, after a postback).
Note |
|---|
The OnEnumerationChanged event is supported by RadMaskedTextBox. |
Two parameters are passed to the event handler:
The following example uses the OnEnumerationChanged event display an alert when the user changes the value of an enumerated mask part :
CopyASPX
<telerik:RadMaskedTextBox ID="RadMaskedTextBox1" runat="server" Mask="<Mon|Tue|Wed|Thu|Fri|Sat|Sun>" PromptChar="_">
<ClientEvents OnEnumerationChanged="EnumerationChanged" />
</telerik:RadMaskedTextBox>
CopyJavaScript
<script type="text/javascript">
function EnumerationChanged(source, eventArgs)
{
if (eventArgs.get_oldValue() != eventArgs.get_newValue())
alert("Changing from " + eventArgs.get_oldValue() + " to "
+ eventArgs.get_NewValue() + " at position " + eventArgs.get_currentPart().offset);
}
</script>
See Also