{
xtype : 'filtergrid',
id : 'grid1',
cm : new Ext.grid.ColumnModel({
columns : [{
header: '列1',
id: 'col1',
dataIndex: 'col1',
width : 100
}, {
header: '列2',
id: 'col2',
dataIndex: 'col2',
width : 100
}, {
header: '列3-1',
id: 'col31',
dataIndex: 'col31',
width : 100
}, {
header: '列3-2',
id: 'col32',
dataIndex: 'col22',
width : 100
}, {
header: '列3-3',
id: 'col33',
dataIndex: 'col33',
width : 100
}],
headerRowsEx : [[{
dataIndex : 'col1',
rowspan : 2
}, {
dataIndex : 'col2',
rowspan : 2
}, {
id : 'col3Header',
header : '列3',
colspan : 3,
width : 300
}], [{
header : '列1'
}, {
header : '列2'
}, {
dataIndex : 'col31',
columnIdRef : ['col3Header']
}, {
dataIndex : 'col32',
columnIdRef : ['col3Header']
}, {
dataIndex : 'col33',
columnIdRef : ['col3Header']
}]]
}),
filters : new Ext.ux.GridFilters({
filters : [{
......
}, {
......
}]
}),
store : ...,
listeners : ...
},
initialize : function(param) {
var grid = Ext.getCmp('grid1');
var cm = grid.getColumnModel();
cm.setHidden(cm.findColumnIndex('col33'), true);
// 查找列的Index
//cm.findColumnIndex('col33');
// 單元格背景色設(shè)置
// grid.getView().getCell(i, j).style.backgroundColor = "gray";
}
標(biāo)題名稱:ExtJS2.2.1實現(xiàn)雙表頭動態(tài)列
文章地址:http://jinyejixie.com/article20/ppspjo.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供標(biāo)簽優(yōu)化、動態(tài)網(wǎng)站、虛擬主機、網(wǎng)站營銷、外貿(mào)網(wǎng)站建設(shè)、軟件開發(fā)
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)