PDA

View Full Version : How to access GroupingStore group by value in a row ?



duskandawn
7 Jul 2010, 9:27 AM
Hello All,
I am using the GroupingStore along with an Editorgrid to show groups of data, and my

GroupStore looks like :


var store = new Ext.data.GroupingStore({
url: 'sample.xml',
groupField: 'imntClsfTypNm',
reader: new Ext.data.XmlReader({
record: 'accountPosition'
}, [
{name:'accId'},
// truncated
]

EditorPanel looks like:
var grid = new Ext.grid.EditorGridPanel({
renderTo: Ext.getBody(),
title: 'Account Positions',
stripeRows : true,
store: store,
columns: [ {header: "Actions", width: 150, dataIndex: 'actions' },
{header: "Acct#", width: 100, dataIndex: 'accId',
summaryType: 'count',
summaryRenderer: function(v, params, data){
// using the /examples/ux/GroupSummary.js

return ("Total" + Group by value); // not sure how to get group by value in groupstore here
}
Added attached screenshot
21336
Can someone help how to get the text in red in my screenshot.

Thank you