PDA

View Full Version : Row editor plugin question



sanjay_1985
31 Dec 2013, 5:14 AM
Hi,
I am using row editor plugin to update grid. I want to use it for adding a new row only. I do not want to show the plugin for updating existing row.
I shall read the record, based on some condition, I would like to prevent the editor from appearing.
Could you please let me know how do I acheive this?

existdissolve
31 Dec 2013, 7:00 PM
Hi,
I am using row editor plugin to update grid. I want to use it for adding a new row only. I do not want to show the plugin for updating existing row.
I shall read the record, based on some condition, I would like to prevent the editor from appearing.
Could you please let me know how do I acheive this?

Checkout the beforeedit event on the editing plugin: http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.grid.plugin.Editing-event-beforeedit

You should be able to inspect the record, determine if it's editable, and then either return true or false, respectively, to allow or disable the editing plugin per row.

sanjay_1985
1 Jan 2014, 8:16 PM
Thanks. It worked