Spread for ASP.NET 7.0 Product Documentation
FilterMenuType Enumeration
Example  See Also  Support Options
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace : FilterMenuType Enumeration


Glossary Item Box

The type of filter menu in the filter bar.

Syntax

Visual Basic (Declaration) 
Public Enum FilterMenuType 
   Inherits System.Enum
Visual Basic (Usage)Copy Code
Dim instance As FilterMenuType
C# 
public enum FilterMenuType : System.Enum 

Members

MemberDescription
AutoThe menu type is automatically indicated by analyzing the data in the column
DateThe datetime filter menu
EnhancedThe enhanced filter menu
NumberThe number filter menu
TextThe text filter menu

Example

This example uses the FilterMenuType enumeration.
C#Copy Code
FarPoint.Web.Spread.FilterBarCellType ct = new FarPoint.Web.Spread.FilterBarCellType();
ct.MenuType = FarPoint.Web.Spread.FilterMenuType.Date;            
System.Globalization.DateTimeFormatInfo dtformat = new System.Globalization.DateTimeFormatInfo();
dtformat.ShortDatePattern = "yy/MM/dd";
dtformat.ShortTimePattern = "";
dtformat.LongTimePattern = "";
ct.DateTimeFormat = dtformat;
ct.DatePickerMode = FarPoint.Web.Spread.DatePickerMode.Auto;

FarPoint.Web.Spread.FilterBarCellType ct1 = new FarPoint.Web.Spread.FilterBarCellType();
ct1.FormatString = "dd";
ct1.MenuType = FarPoint.Web.Spread.FilterMenuType.Date;
           
FarPoint.Web.Spread.FilterBarCellType ct2 = new FarPoint.Web.Spread.FilterBarCellType();   
ct2.MenuType = FarPoint.Web.Spread.FilterMenuType.Number;

FpSpread1.ActiveSheetView.FilterBar.Cells[0].CellType = ct;
FpSpread1.ActiveSheetView.FilterBar.Cells[0].BackColor = System.Drawing.Color.Red;
FpSpread1.ActiveSheetView.FilterBar.Cells[1].CellType = ct1;
FpSpread1.ActiveSheetView.FilterBar.Cells[1].BackColor = System.Drawing.Color.Aqua;
FpSpread1.ActiveSheetView.FilterBar.Cells[2].CellType = ct2;
FpSpread1.ActiveSheetView.FilterBar.Cells[2].BackColor = System.Drawing.Color.Yellow;
           
FpSpread1.ActiveSheetView.AutoFilterMode = FarPoint.Web.Spread.AutoFilterMode.FilterBar;
FpSpread1.ActiveSheetView.Cells[0, 0].CellType = new FarPoint.Web.Spread.DateTimeCellType();
FpSpread1.ActiveSheetView.Cells[0, 1].CellType = new FarPoint.Web.Spread.DateTimeCellType();
FpSpread1.ActiveSheetView.Cells[0, 2].CellType = new FarPoint.Web.Spread.CurrencyCellType();
FpSpread1.ActiveSheetView.Cells[0, 0].Value = DateTime.Now;
FpSpread1.ActiveSheetView.Cells[0, 1].Value = DateTime.Today;
FpSpread1.ActiveSheetView.Cells[0, 2].Value = 33.34;
VB.NETCopy Code
Dim ct As New FarPoint.Web.Spread.FilterBarCellType()
ct.MenuType = FarPoint.Web.Spread.FilterMenuType.Date
Dim dtformat As New System.Globalization.DateTimeFormatInfo()
dtformat.ShortDatePattern = "yy/MM/dd"
dtformat.ShortTimePattern = ""
dtformat.LongTimePattern = ""
ct.DateTimeFormat = dtformat
ct.DatePickerMode = FarPoint.Web.Spread.DatePickerMode.Auto

Dim ct1 As New FarPoint.Web.Spread.FilterBarCellType()
ct1.FormatString = "dd"
ct1.MenuType = FarPoint.Web.Spread.FilterMenuType.Date

Dim ct2 As New FarPoint.Web.Spread.FilterBarCellType()
ct2.MenuType = FarPoint.Web.Spread.FilterMenuType.Number

FpSpread1.ActiveSheetView.FilterBar.Cells(0).CellType = ct
FpSpread1.ActiveSheetView.FilterBar.Cells(0).BackColor = System.Drawing.Color.Red
FpSpread1.ActiveSheetView.FilterBar.Cells(1).CellType = ct1
FpSpread1.ActiveSheetView.FilterBar.Cells(1).BackColor = System.Drawing.Color.Aqua
FpSpread1.ActiveSheetView.FilterBar.Cells(2).CellType = ct2
FpSpread1.ActiveSheetView.FilterBar.Cells(2).BackColor = System.Drawing.Color.Yellow
FpSpread1.ActiveSheetView.AutoFilterMode = FarPoint.Web.Spread.AutoFilterMode.FilterBar
FpSpread1.ActiveSheetView.Cells(0, 0).CellType = New FarPoint.Web.Spread.DateTimeCellType()
FpSpread1.ActiveSheetView.Cells(0, 1).CellType = New FarPoint.Web.Spread.DateTimeCellType()
FpSpread1.ActiveSheetView.Cells(0, 2).CellType = New FarPoint.Web.Spread.CurrencyCellType()
FpSpread1.ActiveSheetView.Cells(0, 0).Value = DateTime.Now
FpSpread1.ActiveSheetView.Cells(0, 1).Value = DateTime.Today
FpSpread1.ActiveSheetView.Cells(0, 2).Value = 33.34

Inheritance Hierarchy

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

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.