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

Status reporting on success/fail of user operation

2 Answers 30 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ric
Top achievements
Rank 1
Ric asked on 29 Jul 2010, 08:38 AM
I'm trying to figure out how to report success or failure of backend operations to the user someplace on the grid. For instance, when the user tries to save changes to a record in the grid and the save fails, some place on the grid a message shows up in red and says "the changes to this record did not save" or "ERROR" or something like that.

I saw that you could do this awhile back using GridStatusBarItem but that was obsoleted in a 2009 release. How do I do something like this?
thanks for the great product,
rm

2 Answers, 1 is accepted

Sort by
0
Veli
Telerik team
answered on 03 Aug 2010, 12:26 PM
Hello Ric,

There are a couple of ways you can implement a status bar item now that it no longer is supported by default in RadGrid:

1. You can use the CommandItemTemplate to define custom content in your command item. You can have, for example, a label that you can find and set its Text when you want to report a message to the user.

2. You can use the GridFooterItem (setting ShowFooter="True" in the MasterTableView) and modify its cells to have it contain a single cell spanning all the column. You can then add a Label or another control to the cell to contain your message.

Both of these approaches are demonstrated in the attached test pages. Default.aspx demonstrates the first approach, Default2.aspx - the second. Note that in both cases, I set the text message as late as the PreRender event of the page or the control. This gives RadGrid a chance to rebind on postback (if needed). As rebinding recreates the grid structure, if I set the text earlier, it will not show.

Regards,
Veli
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
Ric
Top achievements
Rank 1
answered on 18 Sep 2010, 03:53 PM
Veli - thanks so much for the examples and the great narrative! I am up and running!
Tags
Grid
Asked by
Ric
Top achievements
Rank 1
Answers by
Veli
Telerik team
Ric
Top achievements
Rank 1
Share this question
or