This is a migrated thread and some comments may be shown as answers.

MVC - Trapping Read, Create, Update and Destroy Events

1 Answer 349 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Randy
Top achievements
Rank 1
Randy asked on 05 Mar 2017, 07:13 PM

I am using Kendo Grid MVC and I need to be able to hook into the Read, Create, Update and Destroy events so that if my controller code returns an error of some sort, I can redirect to another page to handle the error. Are there any examples of the JavaScript and Controller code I need to have in place to do this?

Thanks very much!

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 07 Mar 2017, 12:58 PM
Hello Randy,

In this scenario, I can suggest using the error event of the DataSource which will be fired if the request to the remote service fails:

http://docs.telerik.com/kendo-ui/api/javascript/data/datasource#events-error

The other option is to have custom functions for , create, update and delete and to handle the error in them:

http://docs.telerik.com/aspnet-mvc/getting-started/custom-datasource#common-scenarios

I hope this will help to achieve the desired result.

Regards,
Stefan
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data (charts) and form elements.
Tags
Grid
Asked by
Randy
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or