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

[Solved] Custom error message for Ajax Insert/Update/Delete

4 Answers 203 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.
Ozzy Knox
Top achievements
Rank 1
Ozzy Knox asked on 08 Nov 2010, 12:27 PM
I am working with Ajax Editing within the Gird extension.  I would like to handle errors/exceptions on Insert/Update/Delete and display a user friendly message in the message box that is displayed, instead of the default "Error! The requested URL returned 500 - Internal Server Error" or the like.

Is there a way to tell the grid to display a custom text message?

4 Answers, 1 is accepted

Sort by
0
Ozzy Knox
Top achievements
Rank 1
answered on 29 Nov 2010, 06:22 PM
Hi, I see that there has been no attempt at an answer to this question. Surely there is a way to get a custom, more elegant message to the client when using Ajax in the MVC grid.  Can somebody from Telerik kindly respond.
0
Atanas Korchev
Telerik team
answered on 30 Nov 2010, 08:07 AM
Hi Ozzy Knox,

We do not guarantee response from Telerik staff in the ASP.NET MVC forums. This is highlighted in our support help topic. If you need guarantied replies from Telerik - use the support ticketing system. In order to be able to open a support ticket  you need to purchase a commercial license for Telerik Extensions for ASP.NET MVC.

As for the custom errors - the OnError event is what you need.

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
0
Ozzy Knox
Top achievements
Rank 1
answered on 09 Dec 2010, 10:12 AM
Hi Atanas,

Thanks for your reply. I am working on the decision-makers in my company to purchase a commercial license.

I have read up on the OnError client side event as per your link.  I see how there is a property in the event handler argument (e) called e.textStatus. However, I cannot see how I actually set the value of e.textStatus from the server side in the Action method.  Can you possibly tell me how to do it.

Thank you kindly
Ozzy 
0
Clare
Top achievements
Rank 2
answered on 31 Dec 2010, 04:21 PM
Tags
Grid
Asked by
Ozzy Knox
Top achievements
Rank 1
Answers by
Ozzy Knox
Top achievements
Rank 1
Atanas Korchev
Telerik team
Clare
Top achievements
Rank 2
Share this question
or