How do i resize the grid panel accoring to the window size. I have given viewconfig{ forcefit:true} but in internet explorer grid panel does not scale with the window size.
Please help me in this issue
var grid = new Ext.grid.GridPanel({
store: store,
colModel: colModel,
view: gv,
stateId: 'myGridid',
stateful: true,
plugins: [filters],
autoHeight: true,
stripeRows: true,
id: 'my-grid',
title: xppo.st('SDE_PRINTERS'),
viewConfig: { forceFit: true },
tbar: tb,
listeners: {
cellclick: function(grid, rowIndex, colIndex, e) {
colClicked = colIndex;
if (colClicked != 0) {
if (grid.getColumnModel().getDataIndex(grid.getColumnModel().getColumnId(colIndex)) == 'Incident') {
return;
}
}
if (colClicked != 0) {
var record = grid.getStore().getAt(rowIndex);
var paramInScope = record.get("InScope");
var paramAssetID = record.get("AssetID");
if (paramInScope == 'Yes') {
OpenPrinterDetailsPopup(paramAssetID, 800, 600);
}
else {
OpenPrinterDetailsPopup(paramAssetID, 300, 200);
}
}
},
rowdblclick: function(grid, rowIndex, columnIndex, e) {
if (colClicked != 0) {
var record = grid.getStore().getAt(rowIndex);
var paramInScope = record.get("InScope");
var paramAssetID = record.get("AssetID");
if (record == null) {
return;
}
if (paramInScope == 'Yes') {
OpenPrinterDetailsPopup(paramAssetID, 800, 600);
}
else {
OpenPrinterDetailsPopup(paramAssetID, 300, 200);
}
}
},
expandedFilter: function() {
Ext.getCmp('my-grid').setWidth(860);
}
,
collapsedFilter: function() {
Ext.getCmp('my-grid').setWidth(1060);
}
}
});
var userHidden = false;
if (showColumn) {
grid.getColumnModel().setHidden(23, false);
}
else {
grid.getColumnModel().setHidden(23, true);
}
if (fl1) {
grid.getColumnModel().setHidden(3, fl1);
}
else {
grid.getColumnModel().setHidden(3, flags1);
}
grid.getStore().reload();
grid.render('grid-example');
});