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

Dynamically show/hide custom summary rows at runtime

I have created a couple of custom summary rows and empty rows above the ggc header. Can I dymanically show or hide these rows at runtime based on a user preference?

3 Replies

AD Administrator Syncfusion Team November 30, 2006 04:28 AM UTC

Hi James,

Use ShowSummaries property to hide/show the summary row in a grid. Here is a code snippet

//To hide the main table summary row.
this.gridGroupingControl1.TopLevelGroupOptions.ShowSummaries = false;

//To hide the nested table summary row.
this.gridGroupingControl1.NestedTableGroupOptions.ShowSummaries = false;

//To hide a particular grouped column summary row.
this.gridGroupingControl1.TableDescriptor.Columns["Col2"].GroupByOptions.ShowSummaries = false;

Best Regards,
Haneef


JB James Blibo November 30, 2006 04:06 PM UTC

None and all of these settings do not work for me. I have a custom grouping engine in my project! Could this be responsible?


AD Administrator Syncfusion Team December 5, 2006 09:48 AM UTC

Hi James,

You need to check the ShowSummaries 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.Kind == DisplayElementKind.Summary )
{
return this.Engine.TopLevelGroupOptions.ShowSummaries;
}
//Your code heree....
}
}
}

Here is a sample.
GGCHideshowSummaries.zip

Best Regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon