導航:首頁 > 編程語言 > extjsgrid合並

extjsgrid合並

發布時間:2023-08-12 06:15:57

『壹』 java里使用EXTjs中GRID問題

var row=Ext.getCmp("你創建的grid的id").getSelectionModel().getSelections();
if(row.length==0)
{
Ext.Msg.alert("提示信息","您沒有選中任何行!");
}
else if(row.length>1){

Ext.Msg.alert("提示信息","對不起只能選擇一個!");
}else if(row.length==1)
{

// 現在可以對選中行row[0]進行操作
}

『貳』 Extjs如何實現跨行跨列合並(1)

你的意思可以如此理解?:


代碼示例:

var cm = new Ext.grid.ColumnModel({

columns: [

new Ext.grid.RowNumberer({ width: 30 }),

{ header: '單位', dataIndex: 'DISNAME', sortable: true, width: 130, align: 'center' },

{ header: '計劃資金', dataIndex: 'TOTALCOST', width: 130, align: 'center' },

{ header: '發改委批復項目數量', width: 100, dataIndex: 'REPLAYCOUNT', align: 'center' },

{ header: '單項工程項目數量', width: 100, dataIndex: 'PROJECTCOUNT', align: 'right' },

{ header: '本周', dataIndex: 'KGWEEKCOUNT', sortable: true, width: 100, align: 'right' },

{ header: '累計', dataIndex: 'KGCOUNT', sortable: true, width: 100, align: 'right' },

{ header: '本周', dataIndex: 'WTYWEEKCOUNT', sortable: true, width: 100, align: 'right' },

{ header: '累計', dataIndex: 'WTYCOUNT', sortable: true, width: 100, align: 'right' },

{ header: '本周', dataIndex: 'JGWEEKCOUNT', sortable: true, width: 100, align: 'right' },

{ header: '累計', dataIndex: 'JGCOUNT', sortable: true, width: 100, align: 'right' },

{ header: '累計已投運單項<br>工程比例(%)', width: 110, dataIndex: 'TYBFBWEEKCOUNT', align: 'right' },

{ header: '本周', width: 100, dataIndex: 'WCWEEKTZ', sortable: true, width: 100, align: 'right' },

{ header: '累計', width: 100, dataIndex: 'WCTZ', sortable: true, width: 100, align: 'right' },

{ header: '累計完成投資<br>比例(%)', width: 110, dataIndex: 'TZBL', align: 'right' }

],

rows: [

[{}, {}, {}, {}, {},

{ header: '已開工單項工程數量', colspan: 2, align: 'center' },

{ header: '已完工未投運單項工程數量', colspan: 2, align: 'center' },

{ header: '已竣工投運單項工程數量', colspan: 2, align: 'center' },

{},

{ header: '對應計劃完成工程量投資', colspan: 2, align: 'center' },

{}

]]

});

『叄』 extjs 如何把兩個store數據放在同一個gridpanel里

Ext.getCmp('tasklist_grid').reconfigure(taskStore);

reconfigure 參數放入要重新綁定的store 就可以。此時store中的fields 匹配grid columns中的 dataIndex ,才正回常顯答示。

『肆』 extjs gridpanel 如何合並單元格

columns:[{
text:'本系統',
defaults:{
style:"text-align:center"
},
menuDisabled:true,
sortable:false,
columns:[{
xtype:'rownumberer',
width:40
},{
text:'借方余額(元)',
dataIndex:''
},{
text:'貸方余額(元)',
dataIndex:'proctCode'
}
]
},{
text:'本系統',
defaults:{
style:"text-align:center"
},
menuDisabled:true,
sortable:false,
columns:[{
xtype:'rownumberer',
width:40
},{
text:'借方余額(元)',
dataIndex:''
},{
text:'貸方余額(元)',
dataIndex:'proctCode'
}
]
},{
text:'本系統',
defaults:{
style:"text-align:center"
},
menuDisabled:true,
sortable:false,
columns:[{
xtype:'rownumberer',
width:40
},{
text:'借方余額(元)',
dataIndex:''
},{
text:'貸方余額(元)',
dataIndex:'proctCode'
}
]
},{
text:'本系統',
defaults:{
style:"text-align:center"
},
menuDisabled:true,
sortable:false,
columns:[{
xtype:'rownumberer',
width:40
},{
text:'借方余額(元)',
dataIndex:''
},{
text:'貸方余額(元)',
dataIndex:'proctCode'
}
]
}]

『伍』 extjs 表頭合並行

要看你使用的是哪個版本的ExtJs

1.如果是4.2版本的grid原生支持列header合並,合並只需在創建列模型時創建下級column就可以了。如

columns:[
{
dataIndex:'',
text:'name'
},{
dataIndex:'',
text:'ccc',
columns:[{
dataIndex:'',
text:'aaa
},{
dataIndex:'',
text:'bbb'
}]
}]

2.如果是3.x系列版本,使用擴展插件,請參照examplesux實例,導入提供的examplesuxColumnHeaderGroup.js和.css,在創建時以plugin的方式插入,請參考示例代碼

閱讀全文

與extjsgrid合並相關的資料

熱點內容
安卓電腦文件管理器 瀏覽:512
聯想手機k860刷機教程 瀏覽:356
oa刪除已發文件 瀏覽:397
win7asp配置文件 瀏覽:362
java網頁能做心跳機制 瀏覽:817
逆戰文件應用在哪裡 瀏覽:102
紅頭文件訂書紅線在哪裡 瀏覽:851
excel怎麼做文件頭 瀏覽:703
為什麼word找不到文件菜單 瀏覽:671
ios15安裝後找不到描述文件 瀏覽:440
學編程怎麼學最有效 瀏覽:873
通過wifi傳文件到ipad 瀏覽:197
js隨機顏色 瀏覽:611
文件快速復制到u盤的軟體 瀏覽:443
如何檢查無線網路驅動是否正常 瀏覽:468
百度網盤來自分享的文件在哪裡 瀏覽:127
如何發視頻到騰訊視頻文件夾里 瀏覽:510
微信打開cad外部文件找不到 瀏覽:882
平板可以打開各種文件後綴的軟體 瀏覽:531
蘋果微信文件怎麼全選 瀏覽:749

友情鏈接