PDA

View Full Version : Help when click an arrow in Ext.grid.EditorGridPanel



emiuanh
23 Jul 2010, 7:06 PM
How can i get the values from Ext.grid.EditorGridPanel when i click and sent the values to Ext.FormPanel
Example : in the grid i have two field id,name . when i click one row and it sent id,name values to ext.Form Panel
have 2 textfield id , name . Thanks

Condor
25 Jul 2010, 5:32 AM
listeners: {
rowclick: function(grid, rowIndex, e){
var record = grid.getStore().getAt(rowIndex);
formPanel.getForm().loadRecord(record);
}
}

evang
25 Jul 2010, 4:11 PM
listeners: {
rowclick: function(grid, rowIndex, e){
var record = grid.getStore().getAt(rowIndex);
formPanel.getForm().loadRecord(record);
}
}

nice, but how to do the samethink after edit roweditor but before the value send to server?
example: in the grid I have two fields weight, percent. when I use roweditor to add weight value, I can get and use the weight value to calculate and get the percent value before send to server. thx.

Condor
25 Jul 2010, 10:22 PM
You can use the RowEditor's 'validateedit' event for that (you can't use 'afteredit', because the record is already submitted then).