5 Oct 2010 4:58 AM #1
RowEditor question: how to refresh row data before editing & after saving ?
I am using a gridpanel with a roweditor plugin and I need to:
- Refresh the row data of the row being edited with the database just before switching into "editing mode".
(This is needed since the table data is modified by multiple users at the same time and we need the user to see the changes done by other users meanwhile)
- Refresh the row data of the row edited (i.e. after the user has confirmed his/her modifications) just before exiting the "editing mode"
(As previous point this is needed since some values of the row could have been updated meanwhile by other users and I would like to update the grid with these new values)
What is the best way to do this ?
5 Oct 2010 5:17 AM #2
- Join Date
- Mar 2007
- The Netherlands
- Vote Rating
1. Write a beforeedit event handler for the roweditor that does the server request to get the new record data and return false.
2. When the new record data is received, update the record and call roweditor.startEditing again (use a flag to not go into step 1 again).
3. Write a validateedit event handler for the roweditor that shows the confirmation dialog and return false.
4. In the messagebox handler (when OK/Yes is pressed) call rowEditor.stopEditing again (use a flag to not go into step 3 again).
By sajan in forum Ext Designer: Help & DiscussionReplies: 3Last Post: 7 Jul 2010, 6:30 AM
By evankstone in forum Ext 1.x: Help & DiscussionReplies: 3Last Post: 17 Jul 2009, 5:03 PM
By cadudecastroalves in forum Ext 2.x: Help & DiscussionReplies: 0Last Post: 31 Jan 2008, 6:09 AM