-1

Extjsの私のコードは次のようになります

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

ここで、ヘッダーは静的です。フィールドのようにヘッダーテキストも変更したいdataIndex。どうすればいいですか?

4

2 に答える 2

0

はい、できます。

最初に、ヘッダーテキストを空白または必要なものに設定します。

gridstore.loadイベントで列名を取得し、テキストを設定します。

例えば、

linelistunitstore.on('load',function(store)
{
    Ext.getCmp('usertype').setText(store.getAt('0').get('operationconditiontempunit'));    
});
于 2012-09-12T07:46:43.437 に答える
0

reconfigureメソッドを見てください: http://docs.sencha.com/ext-js/4-0/#!/api/Ext.panel.Table-method-reconfigure

于 2012-07-06T14:02:18.913 に答える