Spread for ASP.NET 11 Product Documentation
CustomFilterOperatorType Enumeration
Example Example 


FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace : CustomFilterOperatorType Enumeration
Specifies the operator for custom filtering.
Syntax
'Declaration
 
Public Enum CustomFilterOperatorType 
   Inherits System.Enum
'Usage
 
Dim instance As CustomFilterOperatorType
public enum CustomFilterOperatorType : System.Enum 
Members
MemberDescription
EqualShows results which are equal to the criteria.
GreaterThanShows results which are greater than the criteria.
GreaterThanOrEqualShows results which are greater than or equal to the criteria.
LessThanShows results which are less than the criteria.
LessThanOrEqualShows results which are less than or equal to the criteria.
NotEqualShows results which are not equal to the criteria.
Example
This example uses the CustomFilterOperatorType enumeration.
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;
}
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
Inheritance Hierarchy

System.Object
   System.ValueType
      System.Enum
         FarPoint.Web.Spread.CustomFilterOperatorType

See Also

Reference

FarPoint.Web.Spread Namespace