2012-07-06 138 views
-1

我在ExtJS的代码都像动态填充头文字

{ 
    xtype: 'numbercolumn', 
    header: 'Model1', 
    sortable: false, 
    resizable: false, 
    format: '0,000.00', 
    align: 'right', 
    width: 80, 
    dataIndex: 'description', 
    id: 'description'       
} 

这里头是静态的。我想更改标题文字,如dataIndex字段。我该怎么做?

+0

你可能想指定ExtJS的版本中,你正在使用... – sha 2012-07-06 14:02:42

回答

0

当然可以了这一点。

最初将标题文本设置为空白或您想要的。

gridstore.load事件获取列名和设置文本。

例如,

linelistunitstore.on('load',function(store) 
{ 
    Ext.getCmp('usertype').setText(store.getAt('0').get('operationconditiontempunit'));  
});