PDA

View Full Version : using form.Action.Submit with a RowEditor?



shiv
19 Aug 2009, 12:01 PM
Is it possible to use form.Action.Submit with a RowEditor? I want to be able to do something like this:



var myEditor = new Ext.ux.grid.RowEditor({saveText: 'Update', listeners: {afteredit: saveEdits}});
myGrid = new Ext.grid.GridPanel({
plugins: [ editor ],
...etc...
});

function saveEdits() {
if( myEditor.form.isValid() ) {
myEditor.form.submit({
url: 'actions.php',
waitMsg: 'Please wait...',
params: {task: 'UPDATE'},
success: successHandler,
failure: failureHandler
});
} else {
Ext.MessageBox.alert( 'Warning', 'Your form is not valid!' );
}
}
...but I'm getting an "undefined" error on myEditor.form. What am I missing, or is this even possible?