Thursday, 15 March 2012

ext4 - Ext 4.1 form panel loadRecord -



ext4 - Ext 4.1 form panel loadRecord -

i have grid actioncolumn. on click of actioncolun shows menu edit , delete items. when click on edit should display modal-popup window form panel. row info should displayed in fields. i'm able accomplish above thing using loadrecord method.

the code i'm using

actioncolumn.on('click', function (grid, td, rowindex, eve, e) { var rec = grid.getstore().getat(rowindex); if (!this.menu) { this.menu = ext.create('ext.menu.menu', { width: 100, height: 70, plain: true, floating: true, items: [{ text: 'edit', icon: 'images/edit.png', handler: function (a, b, c, d) { var view = ext.widget('userwindow'); view.down('baseform').loadrecord(rec); } }

}

but problem when i'm clicking on edit sec time form panel displaying info loaded first time.

can help

thanx in advance

i achieved above setting record separate variable like

actioncolumn.on('click', function (grid, td, rowindex, eve, e) { actioncolumn.rec = grid.getstore().getat(rowindex); if (!this.menu) { this.menu = ext.create('ext.menu.menu', { width: 100, height: 70, plain: true, floating: true, items: [{ text: 'edit', icon: 'images/edit.png', handler: function (a, b, c, d) { var view = ext.widget('userwindow'); view.down('baseform').loadrecord(actioncolumn.rec); } }

regards url

ext4

No comments:

Post a Comment