Spread for ASP.NET 10 Product Documentation
FilterBarMode Enumeration
Example Example 


Specifies how the filter context menu is loaded.
Syntax
'Declaration
 
Public Enum FilterBarMode 
   Inherits System.Enum
'Usage
 
Dim instance As FilterBarMode
public enum FilterBarMode : System.Enum 
Members
MemberDescription
DynamicSpecifies that the filter context menu data is requested from the server after the page is loaded.
ForceSpecifies that the filter context menu data is loaded in the server before the page is rendered.
InheritSpecifies that the filter bar mode is inherited from the common setting. For the filter bar cell, it is the filter bar setting; otherwise, it is the same as Dynamic.
Example
This example sets the FilterBarMode enumeration.
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
            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
Inheritance Hierarchy

System.Object
   System.ValueType
      System.Enum
         FarPoint.Web.Spread.FilterBarMode

Requirements

Target Platforms: Windows 7, Windows 8, Windows 10, Windows Vista, Windows Server 2003, Windows Server 2008, Windows Server 2012, Windows XP Professional

See Also

Reference

FarPoint.Web.Spread Namespace

 

 


Copyright © GrapeCity, inc. All rights reserved.