Search results

Overview

You can define the native event using on event attribute in component. The value of attribute is treated as an event handler. The event specific data will be available in event arguments.

The different event argument types for each event are,

  • Focus Events - UIFocusEventArgs
  • Mouse Events - UIMouseEventArgs
  • Keyboard Events - UIKeyboardEventArgs
  • Touch Events – UITouchEventArgs

List of Native events supported

We have provided the following native event support to the CheckBox component:

List of Native events
onchange oninput onblur onfocusout onfocusin
onfocus onclick onkeydown onkeyup onkeypress

How to bind onchange event to CheckBox

The onchange attribute is used to bind the onchange event for checkbox. Here, we have explained about the sample code snippets of checkbox.

@using Syncfusion.EJ2.Blazor.Buttons

<EjsCheckBox Label="Change" @onchange="onChange"></EjsCheckBox>

@code {
    private void onChange(Microsoft.AspNetCore.Components.ChangeEventArgs args)
    {
       //onChange Event triggered
    }
}