officefileapi-devexpress-dot-spreadsheet-dot-autofilterbase-5982c491.md
Turns off the filtering functionality.
Namespace : DevExpress.Spreadsheet
Assembly : DevExpress.Spreadsheet.v25.2.Core.dll
NuGet Package : DevExpress.Spreadsheet.Core
void Disable()
Sub Disable
Call the Disable method to disable the filtering functionality for a worksheet or table. In this case, the drop-down arrows will disappear from the column headers and all the specified filters will be removed.
Worksheet worksheet = workbook.Worksheets["Regional sales"];
workbook.Worksheets.ActiveWorksheet = worksheet;
// Enable filtering for the specified cell range.
CellRange range = worksheet["B2:E23"];
worksheet.AutoFilter.Apply(range);
// Disable filtering for the entire worksheet.
worksheet.AutoFilter.Disable();
Dim worksheet As Worksheet = workbook.Worksheets("Regional sales")
workbook.Worksheets.ActiveWorksheet = worksheet
' Enable filtering for the specified cell range.
Dim range As CellRange = worksheet("B2:E23")
worksheet.AutoFilter.Apply(range)
' Disable filtering for the entire worksheet.
worksheet.AutoFilter.Disable()
The following code snippets (auto-collected from DevExpress Examples) contain references to the Disable() method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
// Disable filtering for the entire worksheet.
worksheet.AutoFilter.Disable();
#endregion #DisableFilter
// Disable filtering for the entire worksheet.
worksheet.AutoFilter.Disable();
#endregion #DisableFilter
// Disable filtering for the entire worksheet.
worksheet.AutoFilter.Disable();
#endregion #DisableFilter
' Disable filtering for the entire worksheet.
worksheet.AutoFilter.Disable()
' #End Region ' #DisableFilter
' Disable filtering for the entire worksheet.
worksheet.AutoFilter.Disable()
' #End Region ' #DisableFilter
' Disable filtering for the entire worksheet.
worksheet.AutoFilter.Disable()
' #End Region ' #DisableFilter
See Also