We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Custom headers in GGC

Hi,
We are using Syncfusion Essential Studio 4.4.0.55 (GridGroupingControl).
We need to show first two rows as headers (each header covering few columns) and then show the data in following rows in the GridGroupingControl. Pls see the attached sheet. We can get the second row header from the datasource but my worry is how can I set the first row as header. Many Thanks in advance.

Header1.zip

5 Replies

AD Administrator Syncfusion Team February 27, 2007 05:21 PM UTC

Hi Anand,

Refer this thread. You may try to have an extra row header set up through the custom section above the column header. See if that helps.

Best Regards,
Haneef


AN Anand February 28, 2007 01:42 PM UTC

Hi,
I tried the following code
bmsdgHierarchyMapping.TableModel.Model.Rows.HeaderCount = 1;
bmsdgHierarchyMapping.TableModel.Model.CoveredRanges.Add(GridRangeInfo.Cells(0,0,1,4));
bmsdgHierarchyMapping.TableModel.Model.CoveredRanges.Add(GridRangeInfo.Cells(1,5,1,8));
bmsdgHierarchyMapping.TableModel.Model.CoveredRanges.Add(GridRangeInfo.Cells(1, 9, 1, 12));

So I should get the first 4 columns as a single merged cell and rest four columns from fifth column to eight column as second merged cell. But I get just one header spanning from col 1 to col4 and col5 to col 12 are shown as white space. Please help.


AD Administrator Syncfusion Team February 28, 2007 11:43 PM UTC

Hi Anand,

Please try the attached sample and let me know if this helps.
ExtraRowHeader_GridGroupingControl.zip

Best regards,
Haneef


AN Anand March 11, 2007 08:18 AM UTC

Hi Haneef,
Thanks for the help. Just one query. How to hide the caption section where the no of items shown in grid is shown. I tried to modify the CustomEngine.cs file but it did not work. Please help in which lines need to be modifed.Many Thanks in advance.


AD Administrator Syncfusion Team March 12, 2007 08:33 PM UTC

Hi Anand,

You would have to derive the ChildTable and override the IsChildVisible method to return the false value for the CaptionSection. Please let me know if this helps.

public override bool IsChildVisible(Element el)
{
if (this.IsTopLevelGroup )
{
if (el is CaptionSection )
return false;
else
return true;
}
}

Best Regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon