DevExtreme Angular - Handle Events

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

@Component({
    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