-
31 Oct 2011 9:20 PM #1
Answered: which plugin to be use for row editing
Answered: which plugin to be use for row editing
This question could be very silly and stupid, but I am bit confused why we have two files for row editing ext.grid.plugin.RowEditing and ux.grid.RowEditor.js.
Which one should be used as plugin so that I can use in my application. my commit is not working while updating. I am using extjs 4.0.7 and even tried 4.1pr
-
Best Answer Posted by flanders
I should have been a bit more explicit

Yes, the one to use is Ext.grid.plugin.RowEditing
-
1 Nov 2011 12:57 AM #2Sencha User
- Join Date
- Dec 2009
- Location
- Enschede, The Netherlands
- Posts
- 327
- Vote Rating
- 11
- Answers
- 16
The roweditor was an user extension before (the ux variant) for extjs 3. Now in extjs4 it's part of the framework itself.
So, you should use this version under extjs4
-
1 Nov 2011 1:18 AM #3
-
1 Nov 2011 2:03 AM #4Sencha User
- Join Date
- Dec 2009
- Location
- Enschede, The Netherlands
- Posts
- 327
- Vote Rating
- 11
- Answers
- 16
I should have been a bit more explicit

Yes, the one to use is Ext.grid.plugin.RowEditing
-
1 Nov 2011 3:29 AM #5
-
1 Nov 2011 3:53 AM #6Sencha User
- Join Date
- Dec 2009
- Location
- Enschede, The Netherlands
- Posts
- 327
- Vote Rating
- 11
- Answers
- 16
Without your code I have no clue
But I would guess that you shouldn't use the commit() function but instead sync() the store.
This is what i used to do back in the day
Code:this.editor.on('afteredit', function(editor, changes, record, rowIndex) { if (changes.passwordHash) { record.set('passwordHash', base.SHA1(changes.passwordHash)); } this.store.save(); this.store.reload(); }, this); this.editor.on('canceledit', function(editor, forced) { if (this.store.getAt(0).phantom) { this.store.remove(this.store.getAt(0)); } }, this);
-
1 Nov 2011 7:09 AM #7
Ext.getCmp('bEditor').on('afteredit', function(editor, changes, record, rowIndex) {
console.log('@@@@@@');
editor.store.save();
console.log('SSSSSSSSS@');
editor.store.reload();
console.log('xxxxxxxxxxx@');
});
I am getting error as Uncaught TypeError: Cannot call method 'save' of undefined
-
1 Nov 2011 7:13 AM #8
- [COLOR=red !important]Uncaught TypeError: Cannot call method 'save' of undefined[/COLOR]
- [COLOR=red !important](anonymous function)[/COLOR]
- [COLOR=red !important]fire[/COLOR]ext-all-debug.js:10658
- [COLOR=red !important]Ext.define.continueFireEvent[/COLOR]ext-all-debug.js:13854
- [COLOR=red !important]Ext.define.fireEvent[/COLOR]ext-all-debug.js:13834
- [COLOR=red !important](anonymous function)[/COLOR]ext-all-debug.js:14039
- [COLOR=red !important]fire[/COLOR]ext-all-debug.js:10658
- [COLOR=red !important]Ext.define.continueFireEvent[/COLOR]ext-all-debug.js:13854
- [COLOR=red !important]Ext.define.fireEvent[/COLOR]ext-all-debug.js:13834
- [COLOR=red !important]Ext.define.completeEdit[/COLOR]RowEditing.js:172
- [COLOR=red !important]Ext.define.fireHandler[/COLOR]ext-all-debug.js:29512
- [COLOR=red !important]Ext.define.onClick[/COLOR]ext-all-debug.js:29502
- [COLOR=red !important](anonymous function)[/COLOR]
- [COLOR=red !important]wrap[/COLOR]
- [COLOR=red !important](anonymous function)[/COLOR]
// private
completeEdit: function() {
var me = this;
if (me.editing && me.validateEdit()) {
me.editing = false;
me.fireEvent('edit', me, me.context);
}
},
- [COLOR=red !important]Uncaught TypeError: Cannot call method 'save' of undefined[/COLOR]
-
1 Nov 2011 7:41 AM #9Sencha User
- Join Date
- Dec 2009
- Location
- Enschede, The Netherlands
- Posts
- 327
- Vote Rating
- 11
- Answers
- 16
The parameters that are passed to the eventhandler are changed with regards to what i posted. The code i posted is quite old.
You should put in a console.log(arguments) to explore the arguments and see how you can obtain the correct references. (People note in the docs that the document possibly isn't correct either here)
something like
....on('edit', function(editor) {
editor.store.sync();
});
if I read the docs/comments right
-
3 Nov 2011 1:37 AM #10


Reply With Quote