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

熱點內容
電商平台應該分析哪些數據 瀏覽:343
中國萬年歷安卓版 瀏覽:99
小米6a移動數據打不開怎麼回事 瀏覽:809
電腦編程3d用什麼軟體 瀏覽:170
浮動qq設計 瀏覽:279
word文件怎樣發送到qq裡面 瀏覽:380
社會化購物網站 瀏覽:402
怎麼安裝描述文件 瀏覽:534
微信小程序im通訊 瀏覽:644
php從資料庫讀取數據 瀏覽:330
蘋果手機安裝描述文件應用下架 瀏覽:480
安全程序文件包含哪些 瀏覽:612
ibatis查詢資料庫 瀏覽:453
手機卸載文件找不到文件怎麼辦 瀏覽:545
百度網盤app下載的壓縮文件怎麼導出來 瀏覽:254
小米5開發版驅動程序 瀏覽:785
微信附近搜索怎樣打開 瀏覽:543
ios7那個版本越獄好 瀏覽:344
壓縮文件如何分割 瀏覽:458
蘋果4s怎麼沒地方插卡 瀏覽:943

友情鏈接