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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Dynamically show/hide custom summary rows at runtime

Thread ID:

Created:

Updated:

Platform:

Replies:

52516 Nov 29,2006 06:57 PM UTC Dec 5,2006 09:48 AM UTC Windows Forms 3
loading
Tags: Grouping
James Blibo
Asked On November 29, 2006 06:57 PM UTC

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?

Administrator [Syncfusion]
Replied On 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

James Blibo
Replied On 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?

Administrator [Syncfusion]
Replied On 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

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;