PDA

View Full Version : Combine Grid panels



mayurid
4 Oct 2010, 3:34 AM
hi experts,


can we combine two grid panels, for example i want to have locking grid and editor grid in one grid panel

laurentParis
4 Oct 2010, 3:39 AM
I'm not sure to understand but if you would, on your editor grid panel some rows editable and some rows not editable, use editorgridpanel and add beforeEdit Event, test some conditions and if you want edit this row, return true, else return false

mayurid
4 Oct 2010, 3:47 AM
i want to lock one particular column of grid, and other columns i want to have an editor

laurentParis
4 Oct 2010, 3:54 AM
si it's easy, you set an editor on each column that you need it on ColumnModel !
if you don't set editor on one column in your columnModel, this one stay into display mode only

mayurid
4 Oct 2010, 3:58 AM
ya thats ok but i wanna lock one particular column, so in definition of grid i need to either declare an editor grid panel or locking grid panel. how to combine both?

var role_grid = new Ext.ux.grid.LockingGridPanel({})
OR

var role_grid= new Ext.grid.EditorGridPanel({})

Condor
4 Oct 2010, 5:33 AM
Are you looking for:

var role_grid = new Ext.grid.EditorGridPanel({
colModel: new Ext.ux.grid.LockingColumnModel({...}),
view: new Ext.ux.grid.LockingGridView({...}),
...
});

mayurid
4 Oct 2010, 11:03 PM
your a Genius.... simply "THE GREAT"

starstar
15 Oct 2010, 9:40 AM
Condor, thank you.