Results 1 to 8 of 8

Thread: grid record not getting committed on click of button

  1. #1
    Sencha Premium Member
    Join Date
    Jan 2010
    Posts
    41
    Vote Rating
    -1
      0  

    Default grid record not getting committed on click of button

    Hello Folks,

    I am facing very strange issue of grid editing in IE. I have a grid and to save that grid I have save button outside the grid. Now suppose I edit any cell inside the grid and without clicking anywhere else I click on save button , change don't get commited and because of that when I say store.getUpdatedRecords() I don't get any record.

    Attach is screen shot where I have edited the Telephone area code(last column of Site Information tab) , now suppose I click on save , store.getUpdatedRecords() dont give any record. However if suppose I click somewhere else in screen and then click on save I get modified record.

    extjs_screen.jpg
    Regards
    Rishi Saraf

  2. #2
    Touch Premium Member
    Join Date
    Jun 2011
    Posts
    1,101
    Answers
    113
    Vote Rating
    100
      0  

    Default

    its because the record is not changed in the store until you press the Update button of the roweditor. if you are still in editing mode, the value is still the old one in the store and so getUpdatedRecords() will not find this change.

  3. #3
    Sencha Premium Member
    Join Date
    Jan 2010
    Posts
    41
    Vote Rating
    -1
      0  

    Default

    Hi Farish

    Do you have any idea which event I can fire to update the record.

    Regards
    Rishi Saraf

  4. #4
    Touch Premium Member
    Join Date
    Jun 2011
    Posts
    1,101
    Answers
    113
    Vote Rating
    100
      0  

    Default

    On press of your Save button, you can call the completeEdit() method of the RowEditing plugin and then use store.getUpdatedRecords():

    http://docs.sencha.com/ext-js/4-0/#!...d-completeEdit

  5. #5
    Sencha Premium Member
    Join Date
    Jan 2010
    Posts
    41
    Vote Rating
    -1
      0  

    Default

    Complete edit is RowEditor event however I am using CellEditing plugin. So I want similar event for cell editor.

    Regards
    Rishi Saraf
    Quote Originally Posted by Farish View Post
    On press of your Save button, you can call the completeEdit() method of the RowEditing plugin and then use store.getUpdatedRecords():

    http://docs.sencha.com/ext-js/4-0/#!/api/Ext.grid.plugin.RowEditing-method-completeEdit

  6. #6
    Touch Premium Member
    Join Date
    Jun 2011
    Posts
    1,101
    Answers
    113
    Vote Rating
    100
      0  

    Default

    There is also a completeEdit() method for cellEditing plugin.

    http://docs.sencha.com/ext-js/4-0/#!/api/Ext.grid.plugin.CellEditing-method-completeEdit

    Its a method not an event. You can just call this method on the Save button handler.

  7. #7
    Sencha User
    Join Date
    Oct 2014
    Posts
    2
    Vote Rating
    0
      0  

    Default

    I'm facing this same issue in EditorGridPanel And completeEdit() is not working there. Could you tell me how to resolve this. I'm using Extjs 3.2.1

  8. #8
    Sencha User
    Join Date
    Oct 2014
    Posts
    2
    Vote Rating
    0
      0  

    Default

    Quote Originally Posted by PravinKumar View Post
    I'm facing this same issue in EditorGridPanel And completeEdit() is not working there. Could you tell me how to resolve this. I'm using Extjs 3.2.1
    I'm able to fix this by code

    grid.activeEditor.completeEdit();

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •