PDA

View Full Version : On change event of textfield in grid



hungrycoder
17 Feb 2014, 5:30 AM
Hello everybody,

I need to save all data from a grid, if one of the columns get changed. My problem is that I have no idea how I should fixed that. How is the event called, which I must integrate? How can I read the values of the different columns of the grid? Some example code would be great.

Best regards

hungrycoder

ssamayoa
17 Feb 2014, 6:24 AM
Which grid's plugin are using you, CellEditing or RowEditing?

Nevertheless, check this:
http://docs.sencha.com/extjs/4.2.2/#!/api/Ext.grid.plugin.CellEditing-event-edit
(http://docs.sencha.com/extjs/4.2.2/#!/api/Ext.grid.plugin.CellEditing-event-editNote)
Note that RowEditing's edit event doc is wrong (http://docs.sencha.com/extjs/4.2.2/#!/api/Ext.grid.plugin.RowEditing-event-edit) the event carries more information: http://docs.sencha.com/extjs/4.1.3/#!/api/Ext.grid.plugin.RowEditing-event-edit

Regards.

hungrycoder
17 Feb 2014, 7:02 AM
Thanks ssamayoa,I use CellEditing. Solved my problem with this code :

listeners:
{
edit: function(editor, e)
{
e.record.get('ID');
}
}