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

熱點內容
網路中常用的傳輸介質 瀏覽:518
文件如何使用 瀏覽:322
同步推密碼找回 瀏覽:865
樂高怎麼才能用電腦編程序 瀏覽:65
本機qq文件為什麼找不到 瀏覽:264
安卓qq空間免升級 瀏覽:490
linux如何刪除模塊驅動程序 瀏覽:193
at89c51c程序 瀏覽:329
怎麼創建word大綱文件 瀏覽:622
裊裊朗誦文件生成器 瀏覽:626
1054件文件是多少gb 瀏覽:371
高州禁養區內能養豬多少頭的文件 瀏覽:927
win8ico文件 瀏覽:949
仁和數控怎麼編程 瀏覽:381
項目文件夾圖片 瀏覽:87
怎麼在東芝電視安裝app 瀏覽:954
plc顯示數字怎麼編程 瀏覽:439
如何辨別假網站 瀏覽:711
寬頻用別人的賬號密碼 瀏覽:556
新app如何佔有市場 瀏覽:42

友情鏈接