PDA

View Full Version : Hide grouping header row grid



max5komma2
6 Aug 2010, 3:31 AM
Hello,

IŽam using the groupsummary plugin and know, I want to hide the grouping header row, because I do not need grouping.

Is it possible to hide the header row?

Thanks!

Condor
6 Aug 2010, 3:32 AM
If you don't use grouping then you also shouldn't be using a groupsummary.

There is a GridSummary plugin in the User Extensions forum.

max5komma2
6 Aug 2010, 3:46 AM
Is this plugin handling only one summary row for all rows or for "grouped" rows?

Condor
6 Aug 2010, 3:58 AM
GridSummary shows a single summary row for the entire grid.

max5komma2
6 Aug 2010, 4:01 AM
And I need a summary for a group and the group header should not be shown.

Condor
6 Aug 2010, 4:09 AM
So you do have groups? You just don't want to show the group header for one of the groups?

You can do that by using your own startGroup template.

Example: The following view would not show the group header for the group with value 999:

view: new Ext.grid.GroupingView({
startGroup: new Ext.XTemplate(
'<div id="{groupId}" class="x-grid-group {cls}">',
'<tpl if="gvalue != 999">',
'<div id="{groupId}-hd" class="x-grid-group-hd" style="{style}"><div class="x-grid-group-title">{group}</div></div>',
'</tpl>',
'<tpl if="gvalue == 999"><div class="x-grid-no-group-hd" style="{style}"></div></tpl>',
'<div id="{groupId}-bd" class="x-grid-group-body">'
)
}),

and I'm using the following css rule:

.x-grid-no-group-hd {
border-bottom: 2px solid #99BBE8;;
padding-top: 6px;
height: 0;
font-size: 1px;
}
(but you might want to modify that)

max5komma2
6 Aug 2010, 6:37 AM
Thanks for the code.

But i canŽt find the startGroup in the API...

Condor
6 Aug 2010, 6:45 AM
startGroup and endGroup are config options of Ext.grid.GroupingView (and they not documented yet).

max5komma2
6 Aug 2010, 6:46 AM
endGroup is empty or?

Condor
6 Aug 2010, 8:29 AM
No, both config options have default values (which are not empty).

Sundarganesh Ramar
7 Mar 2014, 1:11 PM
Hi Condor,
your solutions is perfectly working for me but if i apply collapse all functionality then the row which is doesnt have grouping header is hided because of collapse all functioality.Can you please help me.


Code Posted By you,
-------------------------------------------------------------------------------------------------------
Code:


view: new Ext.grid.GroupingView({ startGroup: new Ext.XTemplate( '<div id="{groupId}" class="x-grid-group {cls}">', '<tpl if="gvalue != 999">', '<div id="{groupId}-hd" class="x-grid-group-hd" style="{style}"><div class="x-grid-group-title">{group}</div></div>', '</tpl>', '<tpl if="gvalue == 999"><div class="x-grid-no-group-hd" style="{style}"></div></tpl>', '<div id="{groupId}-bd" class="x-grid-group-body">' ) }),
and I'm using the following css rule:
Code:

.x-grid-no-group-hd { border-bottom: 2px solid #99BBE8;; padding-top: 6px; height: 0; font-size: 1px; }
(but you might want to modify that)
--------------------------------------------------------------------------------------
Thanks,
Sundarganesh R