View Full Version : How to get summaryData and metaData value in summaryRenderer function

11 Dec 2014, 3:35 AM
Hi Guys,

I am new to ExtJS. I working on tooltip display functionality for grouped grid data.
Is there any way I can get summaryData as well as metaData value in summaryRenderer function for columns.

Right now I am using,

summaryRenderer: function (value, metaData, record, rowIndex, colIndex, store){
metaData.tdAttr = 'data-qtip="'+value+'"';

instead I need summaryData obj to be used in place of value in the tooltip.

summaryRenderer: function (value, metaData, record, rowIndex, colIndex, store){
metaData.tdAttr = 'data-qtip="'+<summaryData obj>+'"';

Anybody please help me with the solution.

Thanks in advance.

12 Dec 2014, 1:47 PM
Up to version 4.2.2, this would work:

summaryRenderer: function(value, metaData, record, rowIndex, colIndex, store) {
metaData.tdAttr = 'data-qtip="'+Ext.String.htmlEncode(Ext.encode(metaData.record.getData()))+'"';
return value;

15 Dec 2014, 1:22 AM
@chamacs: This is giving me the total value of the column in the group based grid.

You had replied to my old post regarding the getting summaryData of different fields in the grid.

Similarly, i was looking for displaying the tooltip using summaryData obj and i m using ExtJS 4.2.2.

This below line gives the total value i mean summary value of the whole column where in which i looking for summary total data for particular grid group.


Can you please suggest me how this can be worked out.

Thanks in advance.

15 Dec 2014, 6:21 AM
I will post an example screenshot.
For which i m trying to acheive.

Grouping.png is what i need to achieve. Cost is the sum of A and B


Grouping_1.png is what i getting. Cost is the grid value that we are displaying.
A is the total of all the group A; and B is the total of all group for data B.


Please suggest me how should i go about it.
Here is the link for better understanding, I need a tooltip display on every summary row with
Total hrs: xx Hrs, Avg Hrs: xx Hrs and Service Hrs: xx Hrs as it displayed in the summary row.


This summaryData is available in other versions i.e. I have tested for Exts 4.0.7 as well as, it is working perfectly but not on ExtJS 4.2.2.
Now i have a problem with getting summaryData on current version that I'm using and displaying tool tip with summaryData.

Is there any workaround with same version to get summaryData object and somehow use particular data to show on tool tip on every summary row.

Please help me with this issue that I'm facing.

Bharadwaj GK