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

Server error handling

1 Answer 88 Views
ListView
This is a migrated thread and some comments may be shown as answers.
brian keating
Top achievements
Rank 1
brian keating asked on 30 Aug 2012, 03:40 PM
hi all,



I've a listview bound to MVC4 ApiController calls, this all works fine except when I try to insert a duplicate.

My server will fail it's validation and return a different HttpStatus code,



how can I cancel the insert?? or even refresh the listview?



also,, kendo appears to call my ApiController multiple times from now on when creating new valid records, it's like it keeps trying to resend the invalid entry :-(







1 Answer, 1 is accepted

Sort by
0
Nikolay Rusev
Telerik team
answered on 04 Sep 2012, 07:42 AM
Hello Brian,

You can handle Error event of the DataSource and show the model errors on client.  See how this is implemented in point 10 in the following article for the Grid widget:
http://docs.kendoui.com/getting-started/using-kendo-with/aspnet-mvc/helpers/grid/ajax-editing

Regards,
Nikolay Rusev
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
ListView
Asked by
brian keating
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
Share this question
or