Spread for ASP.NET 10 Product Documentation
MenuType Property (FilterBarCellType)
Example 


Gets or sets the type of the menu.
Syntax
'Declaration
 
Public Property MenuType As FilterMenuType
'Usage
 
Dim instance As FilterBarCellType
Dim value As FilterMenuType
 
instance.MenuType = value
 
value = instance.MenuType
public FilterMenuType MenuType {get; set;}

Property Value

The type of the menu.
Example
This example sets the MenuType property.
protected void Page_Load(object sender, System.EventArgs e)
{
if (this.IsPostBack) return;
FpSpread1.Sheets[0].RowCount = 6;
FpSpread1.Sheets[0].ColumnCount = 6;
//Customize "Cells" in Filter Bar
FarPoint.Web.Spread.SheetView sheetView = FpSpread1.ActiveSheetView;
sheetView.AutoFilterMode = FarPoint.Web.Spread.AutoFilterMode.FilterBar;
sheetView.FilterBar.Cells[0].Border = new FarPoint.Web.Spread.Border(Color.Red);
sheetView.FilterBar.Cells[0].BackColor = Color.GreenYellow;
sheetView.FilterBar.Cells[0].CellType = new FarPoint.Web.Spread.FilterBarCellType();
sheetView.FilterBar.DefaultStyle.Border = new FarPoint.Web.Spread.Border(Color.Yellow);
FarPoint.Web.Spread.FilterBarCellType cellType = new FarPoint.Web.Spread.FilterBarCellType();
cellType.DropDownButton  = false;
cellType.MenuType = FarPoint.Web.Spread.FilterMenuType.Auto;
sheetView.FilterBar.Cells[3].CellType = cellType;
sheetView.FilterBar.Height = 30;
sheetView.FilterBar.DefaultHeaderStyle.Border = new FarPoint.Web.Spread.Border(Color.Red);
sheetView.FilterBar.DefaultHeaderStyle.BackColor = Color.Yellow;
FpSpread1.ActiveSheetView.Cells[0, 0, 2, 5].Text = "Test";
FpSpread1.ActiveSheetView.Cells[3, 0, 5, 5].Text = "A";
}
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If (IsPostBack) Then
    Return
End If
FpSpread1.Sheets(0).RowCount = 6
FpSpread1.Sheets(0).ColumnCount = 6
'Customize "Cells" in Filter Bar
Dim sheetView As FarPoint.Web.Spread.SheetView = FpSpread1.ActiveSheetView
sheetView.AutoFilterMode = FarPoint.Web.Spread.AutoFilterMode.FilterBar
sheetView.FilterBar.Cells(0).Border = New FarPoint.Web.Spread.Border(Drawing.Color.Red)
sheetView.FilterBar.Cells(0).BackColor = Drawing.Color.GreenYellow
sheetView.FilterBar.Cells(0).CellType = New FarPoint.Web.Spread.FilterBarCellType()
sheetView.FilterBar.DefaultStyle.Border = New FarPoint.Web.Spread.Border(Drawing.Color.Yellow)
Dim cellType As New FarPoint.Web.Spread.FilterBarCellType()
cellType.DropDownButton = True
cellType.MenuType = FarPoint.Web.Spread.FilterMenuType.Auto
sheetView.FilterBar.Cells(3).CellType = cellType
sheetView.FilterBar.Height = 30
sheetView.FilterBar.DefaultHeaderStyle.Border = New FarPoint.Web.Spread.Border(Drawing.Color.Red)
sheetView.FilterBar.DefaultHeaderStyle.BackColor = Drawing.Color.Yellow
FpSpread1.ActiveSheetView.Cells(0, 0, 2, 5).Text = "Test"
FpSpread1.ActiveSheetView.Cells(3, 0, 5, 5).Text = "A"
End Sub
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

FilterBarCellType Class
FilterBarCellType Members

 

 


Copyright © GrapeCity, inc. All rights reserved.