PDA

View Full Version : [CLOSED] How I create a 'Add Item' gridPanel?



supera
Feb 23, 2012, 2:55 PM
Hi

I wish create a gridPanel in 'add item' mode.
i.e, the last line in blank. When i click in columns of this last line, a new line is created bellow and the current line is editable.

The data should be stored in memory, or in local array, and update in the database only then OK button clicked.

There are any example for I follow?

thanks for any help!

Daniil
Feb 23, 2012, 4:01 PM
Hi,

Unfortunately, we have no such example.

I think it's possible and there should not be a big problem.

I would look into the Events API of the CellEditing plugin. You, probably, will need to use its BeforeEdit and Edit events.
http://docs.sencha.com/ext-js/4-0/#!/api/Ext.grid.plugin.CellEditing-event-beforeedit (http://docs.sencha.com/ext-js/4-0/#%21/api/Ext.grid.plugin.CellEditing-event-beforeedit)
http://docs.sencha.com/ext-js/4-0/#!/api/Ext.grid.plugin.CellEditing-event-edit (http://docs.sencha.com/ext-js/4-0/#%21/api/Ext.grid.plugin.CellEditing-event-edit)

supera
Feb 23, 2012, 4:18 PM
Ok!

I try follow this examples.

Thank you, Daniil!