PowerTools SPREAD for ASP.NET 8.0J
Cells プロパティ (FilterBar)

フィルタバーのFilterBarCellCollectionオブジェクトを取得します。
構文
'Declaration
 
Public ReadOnly Property Cells As FilterBarCellCollection
public FilterBarCellCollection Cells {get;}
次のサンプルコードは、フィルタバー型セルのプロパティを設定します。
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
参照

FilterBar クラス
FilterBar メンバ

 

 


© 2003-2015, GrapeCity inc. All rights reserved.