Spread ASP.NET 14
FarPoint.Web.Spread Assembly / FarPoint.Web.Spread Namespace / SheetView Class / FilterBar Property

In This Topic
    FilterBar Property
    In This Topic
    Gets or sets FilterBarInfo for filterBar
    Public ReadOnly Property FilterBar As FilterBar
    Dim instance As SheetView
    Dim value As FilterBar
    value = instance.FilterBar
    public FilterBar FilterBar {get;}
    This example sets filter bar properties.
    protected void Page_Load(object sender, EventArgs e)
                if (IsPostBack) return;
                for (int i = 0; i < FpSpread1.ActiveSheetView.RowCount; i++)
                    for (int j = 0; j < FpSpread1.ActiveSheetView.ColumnCount; j++)
                        FpSpread1.ActiveSheetView.Cells[i, j].Value = i + j;
                FarPoint.Web.Spread.FilterBarCellType fbc = new FarPoint.Web.Spread.FilterBarCellType();
                fbc.MenuType = FarPoint.Web.Spread.FilterMenuType.Auto;
                FpSpread1.ActiveSheetView.FilterBar.DefaultStyle.CellType = fbc;
                FpSpread1.ActiveSheetView.AutoFilterMode = FarPoint.Web.Spread.AutoFilterMode.FilterBar;
                FpSpread1.ActiveSheetView.FilterBar.FilterBarMode = FarPoint.Web.Spread.FilterBarMode.Dynamic;
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
            If (IsPostBack) Then
            End If        
            For i As Integer = 0 To FpSpread1.ActiveSheetView.RowCount - 1
                For j As Integer = 0 To FpSpread1.ActiveSheetView.ColumnCount - 1
                    FpSpread1.ActiveSheetView.Cells(i, j).Value = i + j
            Dim fbc As New FarPoint.Web.Spread.FilterBarCellType()
            fbc.MenuType = FarPoint.Web.Spread.FilterMenuType.Auto
            FpSpread1.ActiveSheetView.FilterBar.DefaultStyle.CellType = fbc
            FpSpread1.ActiveSheetView.AutoFilterMode = FarPoint.Web.Spread.AutoFilterMode.FilterBar
            FpSpread1.ActiveSheetView.FilterBar.FilterBarMode = FarPoint.Web.Spread.FilterBarMode.Dynamic
        End Sub
    See Also