PDA

View Full Version : update in rowEditing plugin saves different record if autoCancel false



shailykamboj
9 Mar 2012, 11:22 AM
I am using RowEditing Plugin and as per the design requirement i need to warn the user for unsaved changes in a row if user navigates to another row.
For this i have made autoCancel as false . Problem is if now I edit a row , doesnt click update and try selcting another row , i get a tooltip message for unsaved changes but on clicking 'Update' the update is called for the 2nd row that i had clicked althoug the editor is still being shown at the first row !
Any inputs for this issue ?

Thanks

mitchellsimoens
9 Mar 2012, 12:26 PM
What Ext JS version are you using? This sounds like a bug from what you are saying.

shailykamboj
9 Mar 2012, 1:16 PM
Hello Mitchell ! thanks for replying back
I am using 4.0.7 . If its a bug , could you recommend any workaround for time being?

shailykamboj
9 Mar 2012, 2:25 PM
Hello Mitchell,
I found a workaround for it which seems to be doing good till now .
On beforeedit event , i am checking if editor is visible and dirty by explicitly calling 'beforeEdit' method in RowEditor, if yes then i am returning false .


beforeEdit: function(e, opts){

var editor = e.grid.editingPlugin.editor;
if (editor.beforeEdit() == false) {
return false;
}
}