I have a Kendo UI grid made using Angular 2. This is part of the crud application where I have a delete button. After deleting, I want the grid to automatically update.
This is a grid that shows event notifications:
<kendo-grid [data]="EventsNotificationSetup">
<kendo-grid-command-column title="" width="200">
<template >
<button (click)="EditModal.open()" kendoGridEditCommand kendoButton [icon]="'pencil'">Edit</button>
<button (click) = deleteEventNotification(dataItem.id) kendoGridRemoveCommand kendoButton [primary]="true" [icon]="'trash'">Remove</button>
</template>
</kendo-grid-command-column>
</kendo-grid>
This delete code where I literally deleted the entry:
this._http.delete(this.link + notificationId,
{
headers: new Headers({
'Content-Type': 'application/json'
})
})
.map(res => res.json()).subscribe();
After that, I again did http.get to receive event notifications, but it does not automatically update the grid, I need to refresh the page.
Do you know how I can update the grid?
Thank!
source
share