[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.IRange.AutoFilter

AutoFilter Method

AutoFilter(bool, int, object, AutoFilterOperator, object, bool)

Filters a list using the AutoFilter.

Declaration
void AutoFilter(bool isFirstRowData, int field = 0, object criteria1 = null, AutoFilterOperator op = AutoFilterOperator.And, object criteria2 = null, bool visibleDropDown = true)
Sub AutoFilter(isFirstRowData As Boolean, Optional field As Integer = 0, Optional criteria1 As Object = Nothing, Optional op As AutoFilterOperator = AutoFilterOperator.And, Optional criteria2 As Object = Nothing, Optional visibleDropDown As Boolean = True)
Parameters
Type Name Description
bool isFirstRowData

Indicates whether the first row of the selection area participates in filtering. When set to true, the behavior is consistent with SpreadJS; when false, it is consistent with Microsoft Excel.

int field

Optional Object. The integer offset of the field on which you want to base the filter (from the left of the list; the leftmost field is field zero).

object criteria1

Optional Object. The criteria (a string; for example, "101"). Use "=" to find blank fields, or use "<>" to find nonblank fields. If this argument is omitted, the criteria is All. If Operator is xlTop10Items, Criteria1 specifies the number of items (for example, "10").

AutoFilterOperator op

Optional AutoFilterOperator.

object criteria2

Optional Object. The second criteria (a string). Used with Criteria1 and Operator to construct compound criteria.

bool visibleDropDown

Optional Object. True to display the AutoFilter drop-down arrow for the filtered field; False to hide the AutoFilter drop-down arrow for the filtered field. True by default.

AutoFilter(int, object, AutoFilterOperator, object, bool)

Filters a list using the AutoFilter.

Declaration
void AutoFilter(int field = 0, object criteria1 = null, AutoFilterOperator op = AutoFilterOperator.And, object criteria2 = null, bool visibleDropDown = true)
Sub AutoFilter(Optional field As Integer = 0, Optional criteria1 As Object = Nothing, Optional op As AutoFilterOperator = AutoFilterOperator.And, Optional criteria2 As Object = Nothing, Optional visibleDropDown As Boolean = True)
Parameters
Type Name Description
int field

Optional Object. The integer offset of the field on which you want to base the filter (from the left of the list; the leftmost field is field zero).

object criteria1

Optional Object. The criteria (a string; for example, "101"). Use "=" to find blank fields, or use "<>" to find nonblank fields. If this argument is omitted, the criteria is All. If Operator is xlTop10Items, Criteria1 specifies the number of items (for example, "10").

AutoFilterOperator op

Optional AutoFilterOperator.

object criteria2

Optional Object. The second criteria (a string). Used with Criteria1 and Operator to construct compound criteria.

bool visibleDropDown

Optional Object. True to display the AutoFilter drop-down arrow for the filtered field; False to hide the AutoFilter drop-down arrow for the filtered field. True by default.