X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/7a654f8d43fdb43d78b63d90528bed6e86b608cc..6746dc89c47ed01b165cc1152533605f97eb8e8d:/docs/source/GroupingSummary.html diff --git a/docs/source/GroupingSummary.html b/docs/source/GroupingSummary.html index efa6afc4..02bf8aec 100644 --- a/docs/source/GroupingSummary.html +++ b/docs/source/GroupingSummary.html @@ -1,4 +1,21 @@ -
/**
+
+
+
+
+ The source code
+
+
+
+
+
+
+ /**
* @class Ext.grid.feature.GroupingSummary
* @extends Ext.grid.feature.Grouping
*
@@ -28,7 +45,7 @@
* not specified the default calculated value is shown. The summaryRenderer is called with:
*
* - value {Object} - The calculated value.
- * - data {Object} - Contains all raw summary values for the row.
+ * - summaryData {Object} - Contains all raw summary values for the row.
* - field {String} - The name of the field we are calculating
*
* ## Example Usage
@@ -99,7 +116,7 @@ Ext.define('Ext.grid.feature.GroupingSummary', {
/* End Definitions */
- /**
+ /**
* Modifies the row template to include the summary row.
* @private
* @return {String} The modified template
@@ -115,7 +132,7 @@ Ext.define('Ext.grid.feature.GroupingSummary', {
return tpl;
},
- /**
+ /**
* Gets any fragments needed for the template.
* @private
* @return {Object} The fragments
@@ -133,7 +150,7 @@ Ext.define('Ext.grid.feature.GroupingSummary', {
return fragments;
},
- /**
+ /**
* Gets the data for printing a template row
* @private
* @param {Number} index The index in the template
@@ -157,7 +174,7 @@ Ext.define('Ext.grid.feature.GroupingSummary', {
return data;
},
- /**
+ /**
* Generates all of the summary data to be used when processing the template
* @private
* @return {Object} The summary data
@@ -171,6 +188,7 @@ Ext.define('Ext.grid.feature.GroupingSummary', {
reader = store.proxy.reader,
groups = me.summaryGroups,
columns = me.view.headerCt.getColumnsForTpl(),
+ remote,
i,
length,
fieldData,
@@ -182,7 +200,7 @@ Ext.define('Ext.grid.feature.GroupingSummary', {
data[groups[i].name] = {};
}
- /**
+ /**
* @cfg {String} remoteRoot. The name of the property
* which contains the Array of summary objects. Defaults to <tt>undefined</tt>.
* It allows to use server-side calculated summaries.
@@ -193,8 +211,7 @@ Ext.define('Ext.grid.feature.GroupingSummary', {
reader.root = me.remoteRoot;
reader.buildExtractors(true);
Ext.Array.each(reader.getRoot(reader.rawData), function(value) {
- data[value[groupField]] = value;
- data[value[groupField]]._remote = true;
+ remoteData[value[groupField]] = value;
});
// restore initial reader configuration
reader.root = root;
@@ -207,8 +224,15 @@ Ext.define('Ext.grid.feature.GroupingSummary', {
for (key in fieldData) {
if (fieldData.hasOwnProperty(key)) {
- if (!data[key]._remote) {
- data[key][comp.dataIndex] = fieldData[key];
+ data[key][comp.id] = fieldData[key];
+ }
+ }
+
+ for (key in remoteData) {
+ if (remoteData.hasOwnProperty(key)) {
+ remote = remoteData[key][comp.dataIndex];
+ if (remote !== undefined) {
+ data[key][comp.id] = remote;
}
}
}
@@ -216,4 +240,6 @@ Ext.define('Ext.grid.feature.GroupingSummary', {
return data;
}
});
-
\ No newline at end of file
+
+
+