var records = Etx.getCmp('grdCorpoFatturaVendita').store.getRange();
var castellettoDataArray = [];
for (var x = 0; x < records.length; x++) {
console.log(records[x]);
castellettoDataArray.push(records[x].data);
}
var groupedData = _.groupByMulti(castellettoDataArray, 'CodiceContoContabile');
console.log(groupedData );
答案 0 :(得分:1)
我不太了解你,但我认为你正试图在一个网格上分组:
sencha api:grid grouping
您需要在网格视图定义中添加一个功能:
features: [{
id: 'group',
ftype: 'groupingsummary',
groupHeaderTpl: '{name} ({rows.length})', //print the number of items in the group
hideGroupedHeader: false
}],
Sencha Api上的一个示例:Example