PowerTools SPREAD for Windows Forms 10.0J
AutoFilterColumn(Int32,String,Int32) メソッド


列インデックス
フィルタ文字列
フィルタ項目のインデックス
指定した列の行を指定したフィルタに基づいて自動的にフィルタリングします。
構文
'Declaration
 
Public Sub AutoFilterColumn( _
   ByVal column As Integer, _
   ByVal filterString As String, _
   ByVal filterItemIndex As Integer _
) 
'使用法
 
Dim instance As SheetView
Dim column As Integer
Dim filterString As String
Dim filterItemIndex As Integer
 
instance.AutoFilterColumn(column, filterString, filterItemIndex)
public void AutoFilterColumn( 
   int column,
   string filterString,
   int filterItemIndex
)

パラメータ

column
列インデックス
filterString
フィルタ文字列
filterItemIndex
フィルタ項目のインデックス
次のサンプルコードは、AutoFilterColumnメソッドを使用します。
fpSpread1.Sheets[0].Cells[0, 0, 2, 2].Value = 3;
FarPoint.Win.Spread.DynamicFilterItem dy = new FarPoint.Win.Spread.DynamicFilterItem(FarPoint.Win.Spread.DynamicFilterType.AboveAverage);
FarPoint.Win.Spread.IRowFilter rowFilter = new FarPoint.Win.Spread.HideRowFilter(fpSpread1.ActiveSheet);
FarPoint.Win.Spread.FilterColumnDefinition fd = new FarPoint.Win.Spread.FilterColumnDefinition(1, FarPoint.Win.Spread.FilterListBehavior.Custom);
fd.Filters.Add(dy);
rowFilter.ColumnDefinitions.Add(fd);
fpSpread1.ActiveSheet.RowFilter = rowFilter;
fpSpread1.ActiveSheet.AutoFilterColumn(1, dy.DisplayName, 0);
fpSpread1.ActiveSheet.AutoFilterMode = FarPoint.Win.Spread.AutoFilterMode.EnhancedContextMenu;
FpSpread1.Sheets(0).Cells(0, 0, 2, 2).Value = 3
Dim dy As New FarPoint.Win.Spread.DynamicFilterItem(FarPoint.Win.Spread.DynamicFilterType.AboveAverage)
Dim rowFilter As New FarPoint.Win.Spread.HideRowFilter(FpSpread1.ActiveSheet)
Dim fd As New FarPoint.Win.Spread.FilterColumnDefinition(1, FarPoint.Win.Spread.FilterListBehavior.Custom)
fd.Filters.Add(dy)
rowFilter.ColumnDefinitions.Add(fd)
FpSpread1.ActiveSheet.RowFilter = rowFilter
FpSpread1.ActiveSheet.AutoFilterColumn(1, dy.DisplayName, 0)
FpSpread1.ActiveSheet.AutoFilterMode = FarPoint.Win.Spread.AutoFilterMode.EnhancedContextMenu
参照

SheetView クラス
SheetView メンバ

 

 


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