PDA

View Full Version : Data add from checkbox model grid to simple grid.



punith.mailme
15 Mar 2012, 5:24 AM
Hi All,

'searchPanel grid[action=addtrimsSelect]': {
select: function(model, record, index) {
this.getSelectedTrimsStore().add(record);
Ext.getCmp('selectedBodyTrimPanel').getView().refresh();
},

deselect: function(model, record, index) {
this.getSelectedTrimsStore().remove(record);
Ext.getCmp('selectedBodyTrimPanel').getView().refresh();
}

i have a scenario where i have a checkboxmodel grid on left and a simple grid model on the right.
as i check the row in the checkboxmodel i have to add the selected row to the right grid.

Both of the grid uses the same model.
Ext.define('com.gm.vl.model.YMMModel', {
extend: 'Ext.data.Model',
fields: ['label','value']
});


but as above code as i add the data it is getting added in the store. but is not visible on the screen.
i also did the refresh of grid view as above.


kindly help :)

Thanks
Punith

mitchellsimoens
15 Mar 2012, 10:44 AM
So you need to take a record from one store and add it to another?

punith.mailme
16 Mar 2012, 2:00 AM
I did same as above with removing the '100%' width of the coulmn in grid. surprisngly it worked.
not sure y i need to mention it in px and Not as '100%'

neways Thanks