Shouldn't the following code make all columns in the grid be align 'right' unless I specify otherwise in the buildColumns function? If so, it's not working.
Code:
Ext.define('Costreport.view.CostSummary', { extend: 'Ext.grid.Panel', alias: 'widget.costsummary', initComponent: function() { var me = this; Ext.apply(me, { store: 'Summarys', forceFit: true, stripeRows: true, frame: true, defaults: { align: 'right' //<------------ }, columns: me.buildColumns(), tbar: me.buildTbar() }); me.callParent(arguments); }, buildColumns: function() { return [{ hidden: true, dataIndex: 'GCOMP' }, { hidden: true, dataIndex: 'GFSPAF' }, { hidden: true, dataIndex: 'GFRVSG' }, { hidden: true, dataIndex: 'GFLNTP' }, { hidden: true, dataIndex: 'GFCONT' }, { hidden: true, dataIndex: 'GFACCT' }, { hidden: true, dataIndex: 'GFPERC' }, { hidden: true, dataIndex: 'GFGRP' }, { hidden: true, dataIndex: 'GFSUB' }, { text: '<b>Line</b>', dataIndex: 'GLINE', width: 4 }, { text: '<b>Description</b>', dataIndex: 'GDESC', align: 'left' }, { text: '<b>Current Week</b>', dataIndex: 'GWKAMT' }, { text: '<b>Cost/Unit</b>', dataIndex: 'GWKCST' }, { text: '<b>Quantity</b>', dataIndex: 'GWKQTY' }, { text: '<b>Current Month</b>', dataIndex: 'GMOAMT' }, { text: '<b>Const/Unit</b>', dataIndex: 'GMOCST' }, { text: '<b>Quantity</b>', dataIndex: 'GMOQTY' }, { text: '<b>Current Year</b>', dataIndex: 'GYRAMT' }, { text: '<b>Cost/Unit</b>', dataIndex: 'GYRCST' }, { text: '<b>Quantity</b>', dataIndex: 'GYRQTY' }]; } });
Comment