SpreadJS 13
GC.Spread.Sheets.Tables Namespace / Table type / filterButtonVisible Method
The table column index of the filter button.
Whether the table column's filter button is displayed.
In This Topic
    filterButtonVisible Method
    In This Topic
    Gets or sets whether the table column's filter button is displayed.
    Syntax
    var instance = new GC.Spread.Sheets.Tables.Table(name,
                                                    row,
                                                    col,
                                                    rowCount,
                                                    colCount,
                                                    style,
                                                    options,
                                                    options.showHeader,
                                                    options.showFooter,
                                                    options.useFooterDropDownList,
                                                    options.showResizeHandle);
    var returnValue; // Type: any
    returnValue = instance.filterButtonVisible(tableColumnIndex, value);
    function filterButtonVisible( 
       tableColumnIndex : number,
       value : boolean
    ) : any;

    Parameters

    tableColumnIndex
    The table column index of the filter button.
    value
    Whether the table column's filter button is displayed.

    Return Value

    The table column's filter button display state. If no parameter is set, returns false if all filter buttons are invisible, otherwise, true. If only a number is set, returns whether the specified table column' filter button is displayed. If only a boolean that indicates whether to display filter buttons is set, applies to all filter buttons and returns the table. If two parameters are provided, applies to the specified table columns' filter button and returns the table.
    Example
    This example hides a filter button.
    //Add data
    for (var col = 1; col < 6; col++) {
        for (var row = 2; row < 11; row++) {
            activeSheet.setValue(row, col, row + col);
        }
    }
    
    var sTable = activeSheet.tables.add("table1", 1, 1, 10, 5, GC.Spread.Sheets.Tables.TableTheme.medium2);
    sTable.bandColumns(true);
    sTable.bandRows(true);
    sTable.filterButtonVisible(2, false);
    alert(sTable.filterButtonVisible(2));
    See Also

    Reference

    Table type