Spread for ASP.NET 10 Product Documentation
DropDownButton Property
Example 


Gets or sets a value that indicates whether the drop-down button displays.
Syntax
'Declaration
 
Public Property DropDownButton As Boolean
'Usage
 
Dim instance As FilterBarCellType
Dim value As Boolean
 
instance.DropDownButton = value
 
value = instance.DropDownButton
public bool DropDownButton {get; set;}

Property Value

true if the drop-down button displays; otherwise, false.
Example
This example sets the DropDownButton 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.