Extjs - Grid列不与chrome中的网格标题对齐

时间:2013-11-05 16:14:08

标签: javascript google-chrome extjs

我有一个奇怪的问题,其中extjs网格的列无法与其列标题对齐。这是Chrome特有的。

以下是示例:

enter image description here

firefox中的代码相同(浏览器宽度不同):

enter image description here

这是我的代码:

var summaryGrid = Ext.create('Ext.grid.Panel', {
    store: 'summary-data',
    stripeRows: true,
    columnLines: true,
    autoShow: true, 
    loadMask: true,
    forceFit: true,
columns: [ 
        {header: 'Code', dataIndex: 'code', width: 65},
        {header: 'Type', dataIndex: 'type'},
        {header: 'Attributes', dataIndex: 'attributes'},
    {header: 'Count', dataIndex: 'count'},
        {header: 'Text', dataIndex: 'text', flex: 1},
        {
    header: 'Waived', 
    dataIndex: 'waived'
    },
    {
    xtype: 'actioncolumn',
    items: [{
        icon: './images/add.png',
        tooltip: "Modify the waivers associated with this row.",
        handler: function(grid, rowIndex, colIndex){
            //alert("Button clicked");
            var record = summaryGrid.getStore().getAt(rowIndex);
            WaiverRowIndex = rowIndex;
            WaiverCode = record.get("code");                
            WaiverSource = "context";
            console.log(WaiverCode);
            waiverWin.show();
        }
    },
    {
        icon: './images/remove.png',
        tooltip: "Modify the waivers associated with this row.",
        handler: function(grid, rowIndex, colIndex){
            //alert("Button clicked");
            var record = summaryGrid.getStore().getAt(rowIndex);
            WaiverRowIndex = rowIndex;
            WaiverCode = record.get("code");                
            WaiverText = record.get("text");
            WaiverSource = "context";
            WaiverType = "ALL";
            Ext.MessageBox.confirm('Confirm', 'Remove all waivers on messages with Code: '+WaiverCode, removeWaiver);

        }
    }]
    },  
    ],
bbar: Ext.create('Ext.PagingToolbar', {
    pageSize: 25,
    store: 'summary-data',
    displayMsg: 'Displaying messages {0} - {1} of {2}',
    emptyMsg: "No messages to display"
    }),
listeners: {
        itemdblclick: function(dv, record, item, index, e) {
            CodeRegexp = record.get("code");
            TypeRegexp = record.get("type");
            globalRefresh("true");      
        }
    },
viewConfig: {
    getRowClass: function(record) {
        if(record.get('type') == "Error"){
            return 'error-row';
        }else if(record.get('type') == "Warning"){
            return 'warning-row';
        }else{
            return 'normal-row';
        }
    }       
}

我非常感谢任何人可能对Chrome为何如此奇怪地呈现此网格的任何帮助。谢谢。

0 个答案:

没有答案