MESCIUS SPREAD for Windows Forms 17.0J
CustomFilterItem コンストラクタ

オーバーロード一覧
オーバーロード説明
CustomFilterItem コンストラクタ(SerializationInfo,StreamingContext)CustomFilterItem クラスの新しいインスタンスを初期化します。  
CustomFilterItem コンストラクタ(FilterCondition,FilterCondition,Boolean)カスタムフィルタのインスタンスを作成します。  
次のサンプルコードは、11〜20間の値をフィルタします。
fpSpread1.Sheets[0].Cells[0, 1].Value = 30;
fpSpread1.Sheets[0].Cells[1, 1].Value = 15;
fpSpread1.Sheets[0].Cells[2, 1].Value = 10;       

FarPoint.Win.Spread.CustomFilterItem customfilter = new FarPoint.Win.Spread.CustomFilterItem(new FarPoint.Win.Spread.FilterCondition(FarPoint.Win.Spread.CustomFilterOperatorType.GreaterThan, 10), new FarPoint.Win.Spread.FilterCondition(FarPoint.Win.Spread.CustomFilterOperatorType.LessThan, 20), true);
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(customfilter);
rowFilter.ColumnDefinitions.Add(fd);
fpSpread1.ActiveSheet.RowFilter = rowFilter;
fpSpread1.ActiveSheet.AutoFilterColumn(1, customfilter.DisplayName, 0);
fpSpread1.ActiveSheet.AutoFilterMode = FarPoint.Win.Spread.AutoFilterMode.EnhancedContextMenu;
FpSpread1.Sheets(0).Cells(0, 1).Value = 30
FpSpread1.Sheets(0).Cells(1, 1).Value = 15
FpSpread1.Sheets(0).Cells(2, 1).Value = 10

Dim customfilter As New FarPoint.Win.Spread.CustomFilterItem(New FarPoint.Win.Spread.FilterCondition(FarPoint.Win.Spread.CustomFilterOperatorType.GreaterThan, 10), New FarPoint.Win.Spread.FilterCondition(FarPoint.Win.Spread.CustomFilterOperatorType.LessThan, 20), True)
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(customfilter)
rowFilter.ColumnDefinitions.Add(fd)
FpSpread1.ActiveSheet.RowFilter = rowFilter
FpSpread1.ActiveSheet.AutoFilterColumn(1, customfilter.DisplayName, 0)
FpSpread1.ActiveSheet.AutoFilterMode = FarPoint.Win.Spread.AutoFilterMode.EnhancedContextMenu
参照

CustomFilterItem クラス
CustomFilterItem メンバ

 

 


© MESCIUS inc. All rights reserved.