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');
- }
- }
See Also
- API Reference.WidgetName.Events, for example, API Reference.DataGrid.Events
- DevExtreme-Angular on GitHub
Feel free to share topic-related thoughts here.
If you have technical questions, please create a support ticket in the DevExpress Support Center.
Thank you for the feedback!
If you have technical questions, please create a support ticket in the DevExpress Support Center.