Spread for ASP.NET 7.0 Product Documentation
FilterBarMode Property
See Also  Example Support Options
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > FilterBar Class : FilterBarMode Property


Glossary Item Box

Gets or sets the filter bar mode.

Syntax

Visual Basic (Declaration) 
Public Property FilterBarMode As FilterBarMode
Visual Basic (Usage)Copy Code
Dim instance As FilterBar
Dim value As FilterBarMode
 
instance.FilterBarMode = value
 
value = instance.FilterBarMode
C# 
public FilterBarMode FilterBarMode {get; set;}

Property Value

The filter bar mode.

Example

This example sets the FilterBarMode property.
C#Copy Code
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;
        }
VB.NETCopy Code
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If (IsPostBack) Then
            Return
        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
            Next
        Next
        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

Requirements

Target Platforms: Windows 7, Windows 8, Windows Vista, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6

See Also

© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.