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.

How to get the group counter after filtering?

Thread ID:





128376 Jan 17,2017 03:15 PM Jan 18,2017 04:57 AM WPF 1
Tags: SfDataGrid
Yong Chen
Asked On January 17, 2017 03:15 PM


I have a requirement to get the number of group in the sfDataGrid after doing a filter. I have tried the property sfDataGrid.View.Groups.Count, but this property does not change after filtering.

Can you please suggest what the proper way 

Jai Ganesh S [Syncfusion]
Replied On January 18, 2017 04:57 AM

Hi Yong, 
You can get the groups count after Filtering by using the below code, 
private void Button_Click(object sender, RoutedEventArgs e) 
    int groupCount = 0; 
    foreach(var group in datagrid.View.Groups) 
        if((group as Group).Records.Count>0) 
            groupCount = groupCount+1; 
Jai Ganesh S 


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.

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.