- extjs 獲取grid所有行
var grid = filed.findParentByType('panel'); var rows = grid.store.getData().items;
- 獲取store行字段數據
store.getAt(0).get('finalAmount');
- 合計
features: [{ ftype: 'summary',//計算公式行 dock: 'bottom'//至於底部合計 }], sunmmaryType:'sum' //頁面計算 summaryRenderer: function (value) {//行數據 return this.getView().store.data.items[0].data.sumAmount }
- Extjs actioncolumn動態顯示按鈕
通過getClass方法可以獲取到,當前行的數據,根據指定字段的值可以判斷設置按鈕的顯示或隱藏。
{ text: '操作', xtype: 'actioncolumn', align: 'center', menuDisabled:true, flex:0.5, items:[{ tooltip: '查詢', getClass : function (v, metadata, r, rowIndex, colIndex, store) { if(recValid == 'N'){ return 'x-hidden'; } var data = r.raw.matchFlag; if(data== "PMIS"){ return 'x-hidden'; } return "doc_lines"; } }] }