i'm using KendoUI-Grid in an Angular (5) app.
html:
<kendo-grid [data]="GRIDData"
(add)="addHandler($event)">
<ng-template kendoGridToolbarTemplate>
<button kendoGridAddCommand type="button">Add new</button>
</ng-template>
component:
public addHandler({sender}) {
this.formGroup = createFormGroup({
'Id': 'NEW',
'Name': 'New entry'
});
sender.addRow(this.formGroup);
}
Is it possible to trigger the addCommand (or any other) from outside the grid? Perhaps something like:
html:
<button (click)="gridAddRow()"> Add New Row to Grid</button>
comnponent:
gridAddRow() {
**//calling addHandler ({sender})**
}
THX