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

Filter on value of Group quantity

Thread ID:





130880 Jun 8,2017 11:17 AM UTC Jun 9,2017 11:51 AM UTC WinForms 1
Tags: GridGroupingControl
Pierre Smith
Asked On June 8, 2017 11:17 AM UTC

I have this situation where if I group my records lets say according to the date I want to be able to filter all of the transactions that are higher than a specific amount in the group
So lets say when I group it I have a group of 10 and a group of 20 items how can I show only the group that have more than 10 items

Hope someone can help me with this

Arulpriya Ramalingam [Syncfusion]
Replied On June 9, 2017 11:51 AM UTC

Hi Pierre, 
Thanks for your interest in Syncfusion products. 
how can I show only the group that have more than 10 items 
Suggestion 1 
In order to display the groups based on their grouped items count, the QueryRecordMeetsFilterCriteria event can be used. In that event, the GetChildCount() method can be used to get the grouped items count and e.Result property used to display/hide groups. Please make use of below code and sample, 
//Event Triggering 
this.gridGroupingControl1.QueryRecordMeetsFilterCriteria += GridGroupingControl1_QueryRecordMeetsFilterCriteria; 
//Event Customization 
private void GridGroupingControl1_QueryRecordMeetsFilterCriteria(object sender, Syncfusion.Grouping.QueryRecordMeetsFilterCriteriaEventArgs e) 
     if (this.gridGroupingControl1.TableDescriptor.GroupedColumns.Count > 0) 
         //To display the grouped items based on grouped items count 
         if (e.Record.ParentGroup.GetChildCount() > 10) 
             e.Result = true; 
             e.Result = false; 
         e.Handled = true; 
Suggestion 2 
You can also create a custom GroupingEngine and override the IsGroupVisible() property to display the groups based on the items count. Please make use of below code and sample, 
public class GroupingTable : GridGroup 
    public GroupingTable(Section parent) 
        : base(parent) 
    //Overridden to display the grouped items which are greater than 10 
    protected override bool IsGroupVisible() 
        //To get the grouped items count 
        if (GetFilteredRecordCount() > 10) 
            return true; 
            return false; 
Sample links 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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