How to alert Delete Sucessfully after Destroy of Kendo Grid?

asp.net-mvc, jquery, kendo-grid, razor

Solution

Change to this:

.Events(events => events.Change("onChange").Remove("YourFunctionForAfterDelete")

Then confirm from that...

The alternative being to create a custom command to delete, use ajax and return success/error messages into a dialog or something similar, which is better but take a little more code and reading.

columns.Command(commands =>
                      {
                          commands.Edit() data items
                          commands.Custom("Delete").Click("DeleteByAJAX"); // The "destroy" command removes data items
                      }).Width(95);

Problem

I am using Kendo Grid to display data. Now I know how to ask confirmation of Deletion though kendo grid. Now I want to display alert like Delete Successfully after sucessfull deletion of the record. How can I do it? Here is my kendo grid code. ``` @(Html.Kendo().Grid<RxConnectEntities.DeleteFileDTO>().Name("deleteList") .Columns(columns => { columns.Bound(p => p.DeleteFaxID).Hidden(true); columns.Bound(p => p.FaxName).Width(100).Title("File Name"); columns.Bound(p => p.PerformedDateTime).Width(75).Title("Archive Date").Format("{0:MM/dd/yyyy}"); columns.Command(command => { command.Destroy().Text("Move"); }).Width(50); columns.Bound(p => p.FilePath).Hidden(true); }) .Editable(editable => editable.Mode(GridEditMode.InLine).DisplayDeleteConfirmation("Are you sure want to Move this Finance File?")) .Pageable(p => p.PageSizes(true)) .Scrollable() .Sortable() .Selectable(selectable => selectable.Mode(GridSelectionMode.Single).Type(GridSelectionType.Row)) .Events(events => events.Change("onChange")) .Groupable() .Filterable(filterable => filterable.Extra(false).Operators(operators => operators.ForString(str => str.Clear().StartsWith("Starts with").Contains("contains").IsEqualTo("Is equal to")))) .HtmlAttributes(new { style = "height:738px;" }) .DataSource(dataSource => dataSource .Ajax().ServerOperation(true) .PageSize(20) .Model(m => m.Id(p => p.DeleteFileID)) .Read(read => read.Action("GetFileList", "Fax")) .Destroy(update => update.Action("MoveFileFromArchiveToQueue", "Operation")) )) ```

Original source