DevExtreme v23.1 is now available.

Explore our newest features/capabilities and share your thoughts with us.

Handle Events

To handle an event, use a configuration option. All event handling options are given names that begin with on.

    selector: 'my-app',
    template: '
        <dx-data-grid (onInitialized)="onInitializedEventHandler($event)"></dx-data-grid> 
        <dx-button text="Press me" (onClick)="clickHandler()"></dx-button>
export class AppComponent {
    gridInstance = {};
    onInitializedEventHandler(e) {
        this.gridInstance = e.component;
    clickHandler() {
        alert('Button is clicked');

View Demo

See Also