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 detect if a range is INCLUDED or EXCLUDED by an autofilter option?

Thread ID:





133046 Oct 5,2017 11:30 AM Oct 8,2017 11:06 AM WPF 1
Tags: SfSpreadsheet
Asked On October 5, 2017 11:30 AM

We need to know if a range is visible or hidden (excluded) in an autofilter's range: is it possible?

Thirumurugan Loganathan [Syncfusion]
Replied On October 8, 2017 11:06 AM

Hi Gian, 
You can detect visible or hidden row of the AutoFilter’s ranges by using IsRowVisible property of the Worksheet. Please refer the below code sample for your reference. 
this.spreadsheetControl.WorkbookLoaded += SpreadsheetControl_WorkbookLoaded; 
private void SpreadsheetControl_WorkbookLoaded(object sender, WorkbookLoadedEventArgs args) 
            if (spreadsheetControl.ActiveSheet.AutoFilters.Count > 0) 
                        var firstRow = spreadsheetControl.ActiveSheet.AutoFilters.FilterRange.Row; 
                        var LastRow = spreadsheetControl.ActiveSheet.AutoFilters.FilterRange.LastRow; 
                        for (int row = firstRow; row <= LastRow; row++) 
                                    bool isRowVisible = spreadsheetControl.ActiveSheet.IsRowVisible(row); 


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.