PDA

View Full Version : problem with widths of cells in grid



godfryd
5 Jun 2008, 1:19 AM
Hello,

I've got a problem with grid. The width of header cells
and following rows' cells are different as shown in screenshot.
I can see it in Firefox 3.0 and in IE 6.0. I set width as follows:



var columns = [
{header: "Task", sortable: true, dataIndex: 'id', width: 40},
{header: "State", sortable: true, dataIndex: 'state', width: 100,
renderer: stateRenderer},
{header: "Started", sortable: true, dataIndex: 'started', width: 70,
renderer: function (val, metadata, record){
if (val == "") {
return "unknown";
} else {
return val.slice(0,10) + "<br/>" + val.slice(10);
}
}},
{header: "Finished", sortable: true, dataIndex: 'finished', width: 70,
renderer: function (val, metadata, record){
if (val == "") {
return "-";
} else {
return val.slice(0,10) + "<br/>" + val.slice(10);
}
}},
{header: "Progress", sortable: true, dataIndex: 'state', width: 100,
renderer: function (val, metadata, record){
return record.data.progress + "/" + record.data.progress_max;
}},
{header: "Results", sortable: true, dataIndex: 'state', width: 90,
renderer: myResultRenderer},
{header: "Scenario", sortable: true, dataIndex: 'scenario', width: 150},
{header: "Driver", sortable: true, dataIndex: 'driver', width: 180,
renderer: driverRenderer},
{header: "Chipset", sortable: true, dataIndex: 'chipset', width: 100},
{header: "Machines", sortable: true, dataIndex: 'machines', width: 150,
renderer: machinesRenderer}
];
var grid = new Ext.grid.GridPanel({
store: tasks_store,
columns: columns,
height:650,
width:1100,
title:'Tasks',
bbar: paging_bar
});


Do you have any idea how to fix?

Regards
Michal Nowikowski