MESCIUS SPREAD for ASP.NET 10.0J
IconFilterItem コンストラクタ

アイコン。
アイコン。
構文
'Declaration
 
Public Function New( _
   ByVal icon As ConditionalFormattingIcon _
)
public IconFilterItem( 
   ConditionalFormattingIcon icon
)

パラメータ

icon
アイコン。
次のサンプルコードは、アイコンを使用したフィルタを作成します。
protected void Page_Load(object sender, System.EventArgs e)
{
    if (this.IsPostBack) return;
    FpSpread1.Sheets[0].RowCount = 5;
    FpSpread1.Sheets[0].Cells[0, 1].Value = 3;
    FpSpread1.Sheets[0].Cells[1, 1].Value = 2;
    FpSpread1.Sheets[0].Cells[2, 1].Value = 10;
    FpSpread1.Sheets[0].Cells[3, 1].Value = 1;
    FarPoint.Web.Spread.IconSetConditionalFormattingRule c = new FarPoint.Web.Spread.IconSetConditionalFormattingRule(FarPoint.Web.Spread.ConditionalFormattingIconSetStyle.ThreeTriangles);
    c.IconRuleSet.Add(new FarPoint.Web.Spread.ConditionalFormattingIconValue(10, FarPoint.Web.Spread.ConditionalFormattingValueType.Number, true, FarPoint.Web.Spread.ConditionalFormattingIcon.BlackCircle));
    FarPoint.Web.Spread.ConditionalFormatting IconSetCF = new FarPoint.Web.Spread.ConditionalFormatting(new FarPoint.Web.Spread.Model.CellRange(0, 0, 2, 2), c);
    FpSpread1.Sheets[0].ConditionalFormatting.Add(IconSetCF);
    FarPoint.Web.Spread.IconFilterItem iconfilter = new FarPoint.Web.Spread.IconFilterItem(FarPoint.Web.Spread.ConditionalFormattingIcon.BlackCircle);
    FarPoint.Web.Spread.IRowFilter rowFilter = new FarPoint.Web.Spread.HideRowFilter(FpSpread1.ActiveSheetView);
    FarPoint.Web.Spread.FilterColumnDefinition fd = new FarPoint.Web.Spread.FilterColumnDefinition(1, FarPoint.Web.Spread.FilterListBehavior.Custom);
    fd.Filters.Add(iconfilter);
    rowFilter.ColumnDefinitions.Add(fd);
    FpSpread1.ActiveSheetView.RowFilter = rowFilter;
    FpSpread1.ActiveSheetView.AutoFilterColumn(1, iconfilter.DisplayName);
    FpSpread1.ActiveSheetView.AutoFilterMode = FarPoint.Web.Spread.AutoFilterMode.Enhanced;
}
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 = 5
    FpSpread1.Sheets(0).Cells(0, 1).Value = 3
    FpSpread1.Sheets(0).Cells(1, 1).Value = 2
    FpSpread1.Sheets(0).Cells(2, 1).Value = 10
    FpSpread1.Sheets(0).Cells(3, 1).Value = 1
    Dim c As New FarPoint.Web.Spread.IconSetConditionalFormattingRule(FarPoint.Web.Spread.ConditionalFormattingIconSetStyle.ThreeTriangles)
    c.IconRuleSet.Add(New FarPoint.Web.Spread.ConditionalFormattingIconValue(10, FarPoint.Web.Spread.ConditionalFormattingValueType.Number, True, FarPoint.Web.Spread.ConditionalFormattingIcon.BlackCircle))
    Dim IconSetCF As New FarPoint.Web.Spread.ConditionalFormatting(New FarPoint.Web.Spread.Model.CellRange(0, 0, 2, 2), c)
    FpSpread1.Sheets(0).ConditionalFormatting.Add(IconSetCF)
    Dim iconfilter As New FarPoint.Web.Spread.IconFilterItem(FarPoint.Web.Spread.ConditionalFormattingIcon.BlackCircle)
    Dim rowFilter As New FarPoint.Web.Spread.HideRowFilter(FpSpread1.ActiveSheetView)
    Dim fd As New FarPoint.Web.Spread.FilterColumnDefinition(1, FarPoint.Web.Spread.FilterListBehavior.Custo    m)
    fd.Filters.Add(iconfilter)
    rowFilter.ColumnDefinitions.Add(fd)
    FpSpread1.ActiveSheetView.RowFilter = rowFilter
    FpSpread1.ActiveSheetView.AutoFilterColumn(1, iconfilter.DisplayName)
    FpSpread1.ActiveSheetView.AutoFilterMode = FarPoint.Web.Spread.AutoFilterMode.Enhanced
End Sub
参照

IconFilterItem クラス
IconFilterItem メンバ

 

 


© MESCIUS inc. All rights reserved.