Hello,
Finding some GridPanel rendering issues in both IE6 and IE7.
First issue effects about IE6 and IE7. If I have a gridpanel with a fixed width, and scrolling enabled on the parent container, if the grid is bigger than the available area and the scroll bar appears, scrolling across only scrolls the column header.
http://extjs.jozzhart.com/gridOne.htm
HTML Code:
Ext.onReady(function(){
var xg = Ext.grid;
var reader = new Ext.data.ArrayReader({}, [
{name: 'company'},
{name: 'price', type: 'float'},
{name: 'change', type: 'float'},
{name: 'pctChange', type: 'float'},
{name: 'lastChange', type: 'date', dateFormat: 'n/j h:ia'},
{name: 'industry'},
{name: 'desc'}
]);
var alertsGrid = new xg.GridPanel({
ds: new Ext.data.Store({
reader: reader,
data: xg.dummyData
}),
cm: new xg.ColumnModel([
new xg.RowNumberer(),
{id:'company',header: "Company", width: 40, sortable: true, dataIndex: 'company'},
{header: "Price", width: 20, sortable: true, renderer: Ext.util.Format.usMoney, dataIndex: 'price'},
{header: "Change", width: 20, sortable: true, dataIndex: 'change'},
{header: "% Change", width: 20, sortable: true, dataIndex: 'pctChange'},
{header: "Last Updated", width: 20, sortable: true, renderer: Ext.util.Format.dateRenderer('m/d/Y'), dataIndex: 'lastChange'}
]),
viewConfig: {
forceFit:true
},
width : '800',
title:'Grid with Numbered Rows and Fixed width',
iconCls:'icon-grid'
});
var viewport = new Ext.Viewport( {
layout:"border",
items:[{
region:"center",
title:"dashboard",
autoScroll : true,
items : [alertsGrid]
},{
region:"north",
title:"search",
height:40
},{
region:"south",
title:"Top Questions",
collapsible:true,
collapsed:true
},{
region:"west",
title:"good practice",
collapsible:true,
width:200,
collapsed:true
}]
})
});
Ext.grid.dummyData = [
['3m Co',71.72,0.02,0.03,'9/1 12:00am', 'Manufacturing'],
['Alcoa Inc',29.01,0.42,1.47,'9/1 12:00am', 'Manufacturing'],
['Altria Group Inc',83.81,0.28,0.34,'9/1 12:00am', 'Manufacturing'],
['American Express Company',52.55,0.01,0.02,'9/1 12:00am', 'Finance'],
['The Procter & Gamble Company',61.91,0.01,0.02,'9/1 12:00am', 'Manufacturing'],
['United Technologies Corporation',63.26,0.55,0.88,'9/1 12:00am', 'Computer'],
['Verizon Communications',35.57,0.39,1.11,'9/1 12:00am', 'Services'],
['Wal-Mart Stores, Inc.',45.45,0.73,1.63,'9/1 12:00am', 'Retail'],
['Walt Disney Company (The) (Holding Company)',29.89,0.24,0.81,'9/1 12:00am', 'Services']
];
Second bug only effects IE6. If the gridpanel is set to autoWidth : true, width : 'auto' the grid doens't resize to fit the container, and a scroll bar appears, with the same scrolling issue as described above.
http://extjs.jozzhart.com/gridTwo.htm
HTML Code:
Ext.onReady(function(){
var xg = Ext.grid;
var reader = new Ext.data.ArrayReader({}, [
{name: 'company'},
{name: 'price', type: 'float'},
{name: 'change', type: 'float'},
{name: 'pctChange', type: 'float'},
{name: 'lastChange', type: 'date', dateFormat: 'n/j h:ia'},
{name: 'industry'},
{name: 'desc'}
]);
var alertsGrid = new xg.GridPanel({
ds: new Ext.data.Store({
reader: reader,
data: xg.dummyData
}),
cm: new xg.ColumnModel([
new xg.RowNumberer(),
{id:'company',header: "Company", width: 40, sortable: true, dataIndex: 'company'},
{header: "Price", width: 20, sortable: true, renderer: Ext.util.Format.usMoney, dataIndex: 'price'},
{header: "Change", width: 20, sortable: true, dataIndex: 'change'},
{header: "% Change", width: 20, sortable: true, dataIndex: 'pctChange'},
{header: "Last Updated", width: 20, sortable: true, renderer: Ext.util.Format.dateRenderer('m/d/Y'), dataIndex: 'lastChange'}
]),
viewConfig: {
forceFit:true
},
autoWidth : true,
width : 'auto',
title:'Grid with Numbered Rows and Force Fit',
iconCls:'icon-grid'
});
var viewport = new Ext.Viewport( {
layout:"border",
items:[{
region:"center",
title:"dashboard",
autoScroll : true,
items : [alertsGrid]
},{
region:"north",
title:"search",
height:40
},{
region:"south",
title:"Top Questions",
collapsible:true,
collapsed:true
},{
region:"west",
title:"good practice",
collapsible:true,
width:200,
collapsed:true
}]
})
});
Ext.grid.dummyData = [
['3m Co',71.72,0.02,0.03,'9/1 12:00am', 'Manufacturing'],
['Alcoa Inc',29.01,0.42,1.47,'9/1 12:00am', 'Manufacturing'],
['Altria Group Inc',83.81,0.28,0.34,'9/1 12:00am', 'Manufacturing'],
['American Express Company',52.55,0.01,0.02,'9/1 12:00am', 'Finance'],
['The Procter & Gamble Company',61.91,0.01,0.02,'9/1 12:00am', 'Manufacturing'],
['United Technologies Corporation',63.26,0.55,0.88,'9/1 12:00am', 'Computer'],
['Verizon Communications',35.57,0.39,1.11,'9/1 12:00am', 'Services'],
['Wal-Mart Stores, Inc.',45.45,0.73,1.63,'9/1 12:00am', 'Retail'],
['Walt Disney Company (The) (Holding Company)',29.89,0.24,0.81,'9/1 12:00am', 'Services']
];