PowerTools SPREAD for Windows Forms 8.0J
RowFilter プロパティ


シートの行フィルタを取得または設定します。
構文
'Declaration
 
Public Property RowFilter As IRowFilter
'使用法
 
Dim instance As SheetView
Dim value As IRowFilter
 
instance.RowFilter = value
 
value = instance.RowFilter
public IRowFilter RowFilter {get; set;}

プロパティ値

行フィルタを含む IRowFilter オブジェクト
次のサンプルコードは、シートのフィルタを取得します。
FarPoint.Win.Spread.FilterColumnDefinitionCollection fcdc = new FarPoint.Win.Spread.FilterColumnDefinitionCollection();
FarPoint.Win.Spread.FilterColumnDefinition fcd = new FarPoint.Win.Spread.FilterColumnDefinition(1, FarPoint.Win.Spread.FilterListBehavior.Default);

fcdc.Add(fcd);
FarPoint.Win.Spread.NamedStyle instyle = new FarPoint.Win.Spread.NamedStyle();
FarPoint.Win.Spread.NamedStyle outstyle = new FarPoint.Win.Spread.NamedStyle();
instyle.BackColor = Color.Yellow;
outstyle.BackColor = Color.Gray;
FarPoint.Win.Spread.StyleRowFilter rf = new FarPoint.Win.Spread.StyleRowFilter(fpSpread1.ActiveSheet, fcdc, instyle, outstyle);

fpSpread1.ActiveSheet.RowFilter = rf;

if (rf != null)
{
    DialogResult dlg;
    dlg = MessageBox.Show("Set the filter??");
    if (dlg == DialogResult.OK)
    {
        textBox1.Text = fpSpread1.ActiveSheet.RowFilter().ToString();
    }
}
Dim fcdc As New FarPoint.Win.Spread.FilterColumnDefinitionCollection
Dim fcd As New FarPoint.Win.Spread.FilterColumnDefinition(1, FarPoint.Win.Spread.FilterListBehavior.Default)
fcdc.Add(fcd)
Dim instyle As New FarPoint.Win.Spread.NamedStyle
Dim outstyle As New FarPoint.Win.Spread.NamedStyle
instyle.BackColor = Color.Yellow
outstyle.BackColor = Color.Gray
Dim rf As New FarPoint.Win.Spread.StyleRowFilter(FpSpread1.ActiveSheet, fcdc, instyle, outstyle)

FpSpread1.ActiveSheet.RowFilter = sf

If Not rf Is Nothing Then
    Dim dlg As DialogResult
    dlg = MessageBox.Show("Set the filter??")
    If dlg = DialogResult.OK Then
        TextBox1.Text = FpSpread1.ActiveSheet.RowFilter().ToString
    End If
End If
参照

SheetView クラス
SheetView メンバ

開発者ガイド

フィルタリング

 

 


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