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

[Solved] [Grid Control] Reporting an error if saving failed

1 Answer 80 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
andrew
Top achievements
Rank 1
andrew asked on 26 Nov 2010, 08:47 PM
I'm using an AJAX Grid control for showing, editing and saving records. If a save has failed due to whatever reason, how do I show a custom error message to the client? I have binded the Update event to an Action method called SaveAssociations().

1 Answer, 1 is accepted

Sort by
0
Mike
Top achievements
Rank 1
answered on 14 Sep 2011, 08:30 PM
Bump, I have the same question.

It seems like a Grid Action serializes the Data and Total fields into a json object consumed by the Grid's ajax handler. The whole view isn't getting re rendered so dumping something into the Viewbag seems pointless. I see that there is an alternate approach for binding to an Action in the ajax binding instead of just a controller name etc. Can that action be an intermediate object that can pull apart different parts of the message? Are there any good examples or docs that show the relationship between the grid and the Actions and the GridActions and the views?
Tags
General Discussions
Asked by
andrew
Top achievements
Rank 1
Answers by
Mike
Top achievements
Rank 1
Share this question
or