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

Validation when updating row

1 Answer 95 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Kan
Top achievements
Rank 1
Kan asked on 08 Oct 2010, 11:39 PM
My grid is on ajax binding. And there are certain business rules when updating/deleting rows, so my GridAction method will throw an exception, a prompt stating "Error! The requested URL returned 500 - Internal Server Error" shows. Is there a way to show the actual error message from the exception, instead of always the standard general message. I can see the error in XMLHttpRequest of OnError event.

Or should I actually do the validation in OnSave client event, then cancel it in case of not valid.

Any suggestions? Thanks

Kan

1 Answer, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 11 Oct 2010, 07:53 AM
Hello Kan,

 Using the OnError event is the recommended implementation. You can prevent the default error message dialog by cancelling the event and show the detailed info. Use the xhr (XMLHttpRequest) and its responseText property to get the server response.

Regards,
Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
Kan
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Share this question
or