[]
        
(Showing Draft Content)

GC.Spread.Sheets.Filter.HideRowFilter

Class: HideRowFilter

Sheets.Filter.HideRowFilter

Hierarchy

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new HideRowFilter(range?)

Represents a default row filter.

example

//The following example creates a new filter.
sheet.rowFilter(new GC.Spread.Sheets.Filter.HideRowFilter(new GC.Spread.Sheets.Range(0,0,4,4)));
sheet.repaint();

Parameters

Name Type Description
range? Range The filter range.

Overrides

RowFilterBase.constructor

Properties

extendedRange

extendedRange: Range

Represents the extendedRange for the row filter.

Inherited from

RowFilterBase.extendedRange


range

range: Range

Represents the range for the row filter.

Inherited from

RowFilterBase.range


typeName

typeName: string

Represents the type name string used for supporting serialization.

Inherited from

RowFilterBase.typeName

Methods

addFilterItem

addFilterItem(col, condition): void

Adds a specified filter to the row filter.

Parameters

Name Type Description
col number The column index.
condition Condition The condition to filter.

Returns

void

Inherited from

RowFilterBase.addFilterItem


filter

filter(col?): void

Filters the specified column.

Parameters

Name Type Description
col? number The index of the column to be filtered; if it is omitted, all the columns in the range will be filtered.

Returns

void

Inherited from

RowFilterBase.filter


filterButtonVisible

filterButtonVisible(col?, value?): any

Gets or sets whether the sheet column's filter button is displayed.

Parameters

Name Type Description
col? number The column index of the filter button.
value? boolean Whether the filter button is displayed.

Returns

any

 No parameter <c>false</c> if all filter buttons are invisible; otherwise, <c>true</c>.
 One parameter col <c>false</c> if the specified column filter button is invisible; otherwise, <c>true</c>.
 One parameter value <c>GC.Spread.Sheets.Filter.RowFilterBase</c> sets all filter buttons to be visible(true)/invisible(false).
 Two parameters col,value <c>GC.Spread.Sheets.Filter.RowFilterBase</c> sets the specified column filter button to be visible(true)/invisible(false).

Inherited from

RowFilterBase.filterButtonVisible


filterDialogVisibleInfo

filterDialogVisibleInfo(visibleInfo?): any

Gets or sets the visible info for the row filter.

example

//This example creates a row filter.
 sheet.rowFilter(new GC.Spread.Sheets.Filter.HideRowFilter(new GC.Spread.Sheets.Range(1,1,10,3)));
 var filter = sheet.rowFilter();
 filter.filterDialogVisibleInfo({
          sortByValue : false,
          sortByColor : true,
          filterByColor : true,
          filterByValue : true,
          listFilterArea : false
      })

Parameters

Name Type Description
visibleInfo? IFilterDialogVisibleInfo The visible info for row filter.

Returns

any

If no value is set filter dialog visible info; otherwise, returns the HideRowFilter.


fromJSON

fromJSON(settings): void

Loads the object state from the specified JSON string.

Parameters

Name Type Description
settings Object The row filter data from deserialization.

Returns

void

Inherited from

RowFilterBase.fromJSON


getFilterItems

getFilterItems(col): Condition[]

Gets the filters for the specified column.

Parameters

Name Type Description
col number The column index.

Returns

Condition[]

Returns a collection that contains conditions that belong to a specified column.

Inherited from

RowFilterBase.getFilterItems


getFilteredItems

getFilteredItems(): Condition[]

Gets all the filtered conditions.

Returns

Condition[]

Returns a collection that contains all the filtered conditions.

Inherited from

RowFilterBase.getFilteredItems


getSortState

getSortState(col): SortState

Gets the current sort state.

Parameters

Name Type Description
col number The column index.

Returns

SortState

The sort state of the current filter.

Inherited from

RowFilterBase.getSortState


isFiltered

isFiltered(col?): boolean

Gets a value that indicates whether any row or specified column is filtered.

example

//This example uses the isFiltered method.
activeSheet.setValue(0, 0, "North");
activeSheet.setValue(1, 0, "South");
activeSheet.setValue(2, 0, "East");
activeSheet.setValue(3, 0, "South");
activeSheet.setValue(4, 0, "North");
activeSheet.setValue(5, 0, "North");
activeSheet.setValue(6, 0, "West");
activeSheet.setColumnWidth(0, 80);
//Set a row filter.
activeSheet.rowFilter(new GC.Spread.Sheets.Filter.HideRowFilter(new GC.Spread.Sheets.Range(0, 0, 7, 1)));
//button
$("#button1").click(function () {
    var rowFilter = spread.getActiveSheet().rowFilter();
    if (rowFilter.isFiltered(0)) {
        alert("Row-filtering executed for Column1");
    } else {
        alert("Row-filtering not executed for Column1");
    }
});
//Add button control to page
&lt;input type="button" id="button1" value="button1"/&gt;

Parameters

Name Type Description
col? number The column index.

Returns

boolean

No parameter true if some rows are filtered; otherwise, false. One parameter col true if the specified column is filtered; otherwise, false.

Inherited from

RowFilterBase.isFiltered


isRowFilteredOut

isRowFilteredOut(row): boolean

Determines whether the specified row is filtered out.

Parameters

Name Type Description
row number The row index.

Returns

boolean

true if the row is filtered out; otherwise, false.

Inherited from

RowFilterBase.isRowFilteredOut


onFilter

onFilter(args): void

Performs the action when some columns have just been filtered or unfiltered.

Parameters

Name Type Description
args IFilteredArgs An object that contains the action, sheet, range, filteredRows, and filteredOutRows. See the Remarks for additional information.

Returns

void

Inherited from

RowFilterBase.onFilter


openFilterDialog

openFilterDialog(filterButtonHitInfo): void

Opens the filter dialog when the user clicks the filter button.

Parameters

Name Type Description
filterButtonHitInfo IFilterButtonHitInfo The hit test information about the filter button.

Returns

void

Inherited from

RowFilterBase.openFilterDialog


removeFilterItems

removeFilterItems(col): void

Removes the specified filter.

Parameters

Name Type Description
col number The column index.

Returns

void

Inherited from

RowFilterBase.removeFilterItems


reset

reset(): void

Clears all filters.

Returns

void

Inherited from

RowFilterBase.reset


sortColumn

sortColumn(col, ascending): void

Sorts the specified column in the specified order.

Parameters

Name Type Description
col number The column index.
ascending boolean Set to true to sort as ascending.

Returns

void

Inherited from

RowFilterBase.sortColumn


toJSON

toJSON(): Object

Saves the object state to a JSON string.

Returns

Object

The row filter data.

Inherited from

RowFilterBase.toJSON


unfilter

unfilter(col?): void

Removes the filter from the specified column.

Parameters

Name Type Description
col? number The index of the column for which to remove the filter; if it is omitted, removes the filter for all columns in the range.

Returns

void

Inherited from

RowFilterBase.unfilter