Spread.Sheets Documentation > Developer's Guide > Managing the User Interface > Using Row Filtering > 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 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.
You can create a filter in code with the rowFilter HideRowFilter class. You can hide the filter icon with the filterButtonVisible method.
This example creates a filter.
JavaScript |
Copy Code
|
---|---|
var cellrange =new GC.Spread.Sheets.Range(0, 2, 5, 1); var hideRowFilter =new GC.Spread.Sheets.Filter.HideRowFilter(cellrange); activeSheet.rowFilter(hideRowFilter); //activeSheet.rowFilter(new GC.Spread.Sheets.Filter.HideRowFilter(new GC.Spread.Sheets.Range(0,0,4,4))); |
This example filters rows using code.
JavaScript |
Copy Code
|
---|---|
$(function () { }); |
The following code creates a custom filter.
JavaScript |
Copy Code
|
---|---|
//Create a custom condition. if (value !== null && value >= 10 && value <= 50) { $(function () { $("#button1").click(function(){
|