Spread Windows Forms 10.0 Product Documentation
AutoFilterColumn Method
Example 


Automatically filters the rows in the specified column according to the specified filter.
Overload List
OverloadDescription
AutoFilterColumnAutomatically filters the rows in the specified column according to the specified filter.  
Remarks
The third parameter, filterItemIndex, checks whether the index is 0 or not; it checks whether the "All" item is selected (which is always the first item in the list and so always has index of 0) or not. This uses an index (integer) as opposed to a boolean because it is exposed as a public method and the column may or may not be selected. If the filter is a single item (or none), then the string in the second parameter, filterString, is enough information. The filterString parameter should be an exact match for one of the strings returned by the GetDropDownFilterItems method for the column.
Example
This example filters the second column.
fpSpread1.ActiveSheet.Columns[2].AllowAutoFilter = true;
fpSpread1.ActiveSheet.AutoFilterColumn(2, "London", 1); 

FpSpread1.ActiveSheet.Columns(2).AllowAutoFilter = True
FpSpread1.ActiveSheet.AutoFilterColumn(2, "London", 1) 
Requirements

Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows Server 2012 R2, Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10

See Also

Reference

SheetView Class
SheetView Members
HideRowFilter Class
StyleRowFilter Class

User-Task Documentation

Managing Filtering of Rows

 

 


Copyright © GrapeCity, inc. All rights reserved.