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

How to get the group counter after filtering?

Thread ID:





128376 Jan 17,2017 08:15 PM UTC Jan 18,2017 09:57 AM UTC WPF 1
Tags: SfDataGrid
Asked On January 17, 2017 08:15 PM UTC


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 09:57 AM UTC

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.

Please sign in to access our forum

or the page will be automatically redirected to 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