1. #1
    Ext User
    Join Date
    Oct 2010
    Posts
    1
    Vote Rating
    0
    fededim is on a distinguished road

      0  

    Question RowEditor question: how to refresh row data before editing & after saving ?

    RowEditor question: how to refresh row data before editing & after saving ?


    Hi,

    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 ?

    Federico.

  2. #2
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    91
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    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).

Similar Threads

  1. Replies: 3
    Last Post: 7 Jul 2010, 6:30 AM
  2. Saving grid data on row change and focus lost
    By evankstone in forum Ext 1.x: Help & Discussion
    Replies: 3
    Last Post: 17 Jul 2009, 5:03 PM
  3. Question about inserting/editing form data
    By cadudecastroalves in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 31 Jan 2008, 6:09 AM

Thread Participants: 1

Tags for this Thread