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

Thread ID:





133046 Oct 5,2017 03:30 PM UTC Oct 8,2017 03:06 PM UTC WPF 1
Tags: SfSpreadsheet
Asked On October 5, 2017 03:30 PM UTC

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 03:06 PM UTC

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.

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