導航:首頁 > 編程語言 > 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合並相關的資料

熱點內容
華創網路信號怎麼樣 瀏覽:495
共享單車網站源碼 瀏覽:281
a班練琴app下載不了怎麼回事 瀏覽:349
數控中怎麼編程 瀏覽:409
vm如何安裝linux系統 瀏覽:423
歌手實績數據在哪裡看 瀏覽:691
代碼002 瀏覽:714
jdk如何編譯java文件 瀏覽:900
修改iptables配置文件 瀏覽:427
word自動保存指定文件夾 瀏覽:18
電腦畫質不清晰win10 瀏覽:912
diskgen使用教程 瀏覽:970
常州數控車編程培訓哪裡有 瀏覽:44
如何升級晴明等級 瀏覽:347
開頭是什麼文件 瀏覽:645
linux16進制看elf文件 瀏覽:663
紙檔文件怎麼能變成excel檔 瀏覽:481
迅雷下載總出現jsp 瀏覽:150
創建網頁用什麼編程語言 瀏覽:526
考研哪個app好 瀏覽:30

友情鏈接