Visual Basic (Declaration) | |
---|---|
Public Function New( _ ByVal firstCusFilter As FilterCondition, _ ByVal secondCusFilter As FilterCondition, _ ByVal and As Boolean _ ) |
Visual Basic (Usage) | Copy Code |
---|---|
Dim firstCusFilter As FilterCondition Dim secondCusFilter As FilterCondition Dim and As Boolean Dim instance As New CustomFilterItem(firstCusFilter, secondCusFilter, and) |
C# | |
---|---|
public CustomFilterItem( FilterCondition firstCusFilter, FilterCondition secondCusFilter, bool and ) |
Parameters
- firstCusFilter
- First custom filter
- secondCusFilter
- Second custom filter
- and
- And relationship
This example creates a filter with custom conditions.
C# | Copy Code |
---|---|
protected void Page_Load(object sender, System.EventArgs e) { if (this.IsPostBack) return; 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.Web.Spread.CustomFilterItem customfilter = new FarPoint.Web.Spread.CustomFilterItem(new FarPoint.Web.Spread.FilterCondition(FarPoint.Web.Spread.CustomFilterOperatorType.GreaterThan, 10), new FarPoint.Web.Spread.FilterCondition(FarPoint.Web.Spread.CustomFilterOperatorType.LessThan, 20), true); 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(customfilter); rowFilter.ColumnDefinitions.Add(fd); FpSpread1.ActiveSheetView.RowFilter = rowFilter; FpSpread1.ActiveSheetView.AutoFilterColumn(1, customfilter.DisplayName); FpSpread1.ActiveSheetView.AutoFilterMode = FarPoint.Web.Spread.AutoFilterMode.Enhanced; } |
VB.NET | Copy Code |
---|---|
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).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.Web.Spread.CustomFilterItem(New FarPoint.Web.Spread.FilterCondition(FarPoint.Web.Spread.CustomFilterOperatorType.GreaterThan, 10), New FarPoint.Web.Spread.FilterCondition(FarPoint.Web.Spread.CustomFilterOperatorType.LessThan, 20), True) Dim rowFilter As New FarPoint.Web.Spread.HideRowFilter(FpSpread1.ActiveSheetView) Dim fd As New FarPoint.Web.Spread.FilterColumnDefinition(1, FarPoint.Web.Spread.FilterListBehavior.Custom) fd.Filters.Add(customfilter) rowFilter.ColumnDefinitions.Add(fd) FpSpread1.ActiveSheetView.RowFilter = rowFilter FpSpread1.ActiveSheetView.AutoFilterColumn(1, customfilter.DisplayName) FpSpread1.ActiveSheetView.AutoFilterMode = FarPoint.Web.Spread.AutoFilterMode.Enhanced End Sub |
Target Platforms: Windows 7, Windows 8, Windows Vista, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6