how to customize GridCaptionRow that sit above GridColumnHeaderRow

I would like to manipulate the top most GridCaptionRow that sits right above the GridColumnHeaderRow. In my case, it has the text ''GroupingSortList: {n} Items''.

1. How do I hide or remove this row?

2. How do I customize the text in this row?

5 Replies

AD Administrator Syncfusion Team September 29, 2006 05:24 AM UTC

Hi James,

Regarding Question 1:

Use the TopLevelGroupOptions.ShowCaption property to show/hide the maintable caption row in a groupingrid. Below is a code.

//To show the GroupCaptionRow.
this.gridGroupingControl1.TopLevelGroupOptions.ShowCaption = true;

//To hide the GroupCaptionRow.
this.gridGroupingControl1.TopLevelGroupOptions.ShowCaption = false;

Regarding Question 2:

Use the TopLevelGroupOptions.CaptionText property to change the text of the maintable caption row in a grid. Below is a code.

this.gridGroupingControl1.TopLevelGroupOptions.CaptionText = "your text here";

Best Regards,
Haneef


JA jamesb September 29, 2006 09:35 AM UTC

Unfortunately, this row is still showing... I want to completely remove this row


AD Administrator Syncfusion Team September 29, 2006 12:31 PM UTC

Hi James,

Are you implementing any CustomEngine in your grid? If so , you need to check the TopLevelGroupOptions.ShowCaption property in IsChildVisible override method [ChildTable derived class] . Below is a code snippet.

public class GroupingChildTable : ChildTable, IGridGroupOptionsSource
{
public override bool IsChildVisible(Element el)
{
if (this.IsTopLevelGroup)
{
if (el is CaptionSection )
{
if(this.Engine.TopLevelGroupOptions.ShowCaption)
return true;
return false;
}
return true;
}
}
}

Sample : http://www.syncfusion.com/Support/user/uploads/GGCHideshowCaption_b56ae658.zip

Thanks,
Haneef


JA jamesb September 30, 2006 01:37 AM UTC

you''re too the point. that fix it


SK Swapnil Kulkarni November 16, 2006 05:08 PM UTC


Thanks. That solves my problem too.

Loader.
Up arrow icon