Edit this page


The OnEnable client-side event handler is called when the input control is enabled.

Two parameters are passed to the event handler:

  • sender is the input control.

  • eventArgs is an instance of Sys.EventArgs.

The following example uses the OnEnable event to disable another control when the input control is enabled:

<telerik:RadTextBox RenderMode="Lightweight" ID="RadTextBox1" runat="server" ShowButton="True">
    <ClientEvents OnEnable="DisableOtherInput" OnButtonClick="ToggleEnabled" />
<telerik:RadNumericTextBox RenderMode="Lightweight" ID="RadNumericTextBox1" runat="server" Enabled="False" ShowButton="True">
        <ClientEvents onenable="DisableOtherInput" onbuttonclick="ToggleEnabled" />
<script type="text/javascript">
    function DisableOtherInput(sender, eventArgs)
        if (sender.get_id() == "<%= RadTextBox1.ClientID %>")
            var other = $find("<%= RadNumericTextBox1.ClientID %>");
        else if (sender.get_id() == "<%= RadNumericTextBox1.ClientID %>")
            var other = $find("<%= RadTextBox1.ClientID %>");
    function ToggleEnabled(sender, eventArgs)
        if (sender.get_enabled()) sender.enable();
        else sender.enable();

See Also

Is this article helpful? No Yes
Thank you for your feedback!

Give article feedback

Tell us how we can improve this article