View Full Version : Table column width calculation issue moving from 2.2 to 3.2.1

30 Jun 2010, 8:12 AM

I am moving an application from version 2.2 of ExtJS to 3.2.1 Most everything works fine but I am having an issue with two tables in context. It appears that the calculations for column widths is going wrong. I am using FireFox 3.0.19. I also see problems in IE6 but they manifest differently. When I look at the HTML generated for the table in Firebug, I see a style attribute for each row but it is an empty string. Under 2.2, I see the a width value expressed in the style as I would expect. I am including example code that reproduces the behavior for FireFox (at least 3.0.19). Would anyone care to suggest what is wrong with the code?

Tried to send as attachment but it does not work through my company firewall.

Thank you,

**** HTML ****
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="/extjs/resources/css/ext-all.css">
<script type="text/javascript" src="/extjs/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="/extjs/ext-all-debug.js"></script>
<script type="text/javascript">
// reference local blank image
Ext.BLANK_IMAGE_URL = '/extjs/resources/images/default/s.gif';
<script type="text/javascript" src="../js/table_test.js"></script>
<!-- Insert your content here -->
<div id="grid-example"></div>

**** JS ****

sheetTableData = {"rows":[{"min":null,"table":"1","max":null,"tableIndex":1,"id":1,"paramIndex":1,"param":"Gewindeabma▀e:"},

var sheetTableGrid = Ext.extend(Ext.grid.GridPanel, {
initComponent: function() {
var sheetTableColumns = [ {id: 'table', header: 'Table', width: '6', dataIndex: 'table'}
,{id: 'param', header: 'Parameter Name', width: '50', dataIndex: 'param'}
,{id: 'min', header: 'Default Min', width: '40', dataIndex: 'min'}
,{id: 'max', header: 'Default Max', width: '40', dataIndex: 'max'}
Ext.apply(this, {
title: 'Drawing Sheet Table Parameters'
,store: new Ext.data.JsonStore({
root: "rows"
,id: "id"
,fields: [ {name: 'id'}, {name: 'tableIndex'}, {name: 'paramIndex'}
,{name: 'table'} ,{name: 'param'}, {name: 'min'}
,{name: 'max'}
,columns: sheetTableColumns
,viewConfig: { autoFill: true }
,stripeRows: true
,frame: true
,enableHdMenu: false
}); // eo apply

// call parent
sheetTableGrid.superclass.initComponent.apply(this, arguments);
sheetTableTable = this;

} // eo function initComponent

,onRender:function() {

// call parent
sheetTableGrid.superclass.onRender.apply(this, arguments);

// load the store

} // eo function onRender


Ext.reg('sheettablegrid', sheetTableGrid);

var grid = new sheetTableGrid();

// render the grid to the specified div in the page