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

熱點內容
網路上的表情是什麼意思 瀏覽:819
exosshow哪個app好 瀏覽:691
clr資料庫程序集優點 瀏覽:919
手機編輯sql文件 瀏覽:355
裝了w8系統d盤文件沒了 瀏覽:509
殺毒軟體刪除的文件怎麼找回 瀏覽:853
novalct大屏配置文件 瀏覽:137
iphone磁吸數據線哪個好 瀏覽:279
終結者遠程式控制制軟體賬號密碼 瀏覽:53
chttp發送文件路徑 瀏覽:558
網站類論文功能設計模塊怎麼寫 瀏覽:933
斗魚伴侶看不到qq游戲 瀏覽:401
5s怎麼看運營商版本 瀏覽:410
導出選定網格到外部文件 瀏覽:508
vrmkv文件沒有聲音 瀏覽:447
惠普電腦u盤裝系統視頻教程 瀏覽:906
ufo文件查看 瀏覽:399
什麼市資料庫的安全性 瀏覽:335
fanucotd數控車床如何編程 瀏覽:62
蘋果開機時白屏黑蘋果 瀏覽:559

友情鏈接