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. (Last updated on : November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GridGroupingControl Custom Engine Issue

Thread ID:

Created:

Updated:

Platform:

Replies:

37017 Nov 14,2005 11:02 PM UTC Nov 15,2005 06:25 PM UTC WinForms 4
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On November 14, 2005 11:02 PM UTC

I am supressing any group caption for a group that only contains one row by using a custom engine. However when I use the custom engine it also suppresses the group summary for all groups (not just the groups containting only one row). I am doing this in the isChildVisible event by returning false if the el type is a captionsection and the record count is 1. Why would this cause the summary to be suppressed and how can I make the summary follow the same rules as the header.

Administrator [Syncfusion]
Replied On November 14, 2005 11:19 PM UTC

Just as a test, if you always return true in your isChildVisible event, does the summary show up then? If so, then you should see if you can spot some difference in the event args to distinguish the two cases so you can return true in the case where you want to see the child and false when you do not.

Administrator [Syncfusion]
Replied On November 15, 2005 04:38 PM UTC

Changing the event isChildVisible to always return true does still not display the summary row. Disabling the custome engine does show the summary row.

Administrator [Syncfusion]
Replied On November 15, 2005 05:47 PM UTC

In your IsChildVisible override, check for a GridSummarySection and return true to always see it.
public override bool IsChildVisible(Element el)
{
	if (el is GridSummarySection)
	{
		return true;
	}	
	else if (el is CaptionSection)
	{
		if (this.Details == null || this.Records.Count == 0 || this.Records.Count > 1)
			return true;
		else
			return false;
	}
	else if (el is DetailsSection)
	{
		if (this.Details == null || this.Records.Count == 0 || this.Records.Count > 1)
			return el.ParentGroup.IsExpanded;
		else
			return true;
	}			
	else   
		return el.ParentGroup.IsExpanded;
}

Administrator [Syncfusion]
Replied On November 15, 2005 06:25 PM UTC

Turns out I had to add a section in the oninitialsections for the summary.

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

;