Filtering Rows

You can hide filtered rows. A filter button is displayed in the column header for a column that allows filtering. The user can click on the button and select the item they wish to filter by and they can sort the list of items.

The following image displays the Filter dialog.

The user can use the mouse or various keyboard keys to interact with the Filter dialog. The Esc key can be used to cancel the dialog. The Tab key can be used to move to different sections and the up and down arrow keys can be used to move in the list of items. The Spacebar can be used to change the checked status.

The following image shows the list sorted in ascending order.

You can create a filter in code with the RowFilter property and the HideRowFilter class.

Using Code

This example creates a row filter.

CS
Copy Code
GrapeCity.Xaml.SpreadSheet.Data.CellRange cellrange = new GrapeCity.Xaml.SpreadSheet.Data.CellRange(0, 2, 5, 1);
GrapeCity.Xaml.SpreadSheet.Data.HideRowFilter hideRowFilter = new GrapeCity.Xaml.SpreadSheet.Data.HideRowFilter(cellrange);
gcSpreadSheet1.Sheets[0].RowFilter = hideRowFilter;
VB
Copy Code
Dim cellrange As New GrapeCity.Xaml.SpreadSheet.Data.CellRange(0, 2, 5, 1)
Dim hideRowFilter As New GrapeCity.Xaml.SpreadSheet.Data.HideRowFilter(cellrange)
GcSpreadSheet1.Sheets(0).RowFilter = hideRowFilter

 

 


Copyright © GrapeCity, inc. All rights reserved.