Results 1 to 1 of 1

Thread: problem with widths of cells in grid

  1. #1
    Sencha User
    Join Date
    Oct 2007
    Posts
    9

    Default problem with widths of cells in grid

    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:

    Code:
    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
    Attached Images Attached Images

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •