Spread for ASP.NET 7.0 Product Documentation
AutoFilterMode Property
See Also  Example Support Options
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > SheetView Class : AutoFilterMode Property


Glossary Item Box

Gets or sets the AutoFilterMode which indicates which filtering UI will be used.

Syntax

Visual Basic (Declaration) 
Public Property AutoFilterMode As AutoFilterMode
Visual Basic (Usage)Copy Code
Dim instance As SheetView
Dim value As AutoFilterMode
 
instance.AutoFilterMode = value
 
value = instance.AutoFilterMode
C# 
public AutoFilterMode AutoFilterMode {get; set;}

Remarks

Note: In versions earlier than V7, if you set the SheetView.RowFilter to a HideRowFilter, the label of the header cell in the filter column (specified through FilterColumnDefinition) changed to the "FilterBy" string (if the column is not filtered, the "(All)" string is displayed). In version 7, specify the AutoFilterMode (if your mode differs from the default mode FilterGadget) before you set a HideRowFilter to SheetView.

Example

This example sets the AutoFilterMode property.
C#Copy Code
protected void Page_Load(object sender, System.EventArgs e)
{
if (this.IsPostBack) return;
FpSpread1.Sheets[0].Cells[0, 0, 2, 2].Value = 3;
FarPoint.Web.Spread.DynamicFilterItem dy = new FarPoint.Web.Spread.DynamicFilterItem(FarPoint.Web.Spread.DynamicFilterType.AboveAverage);
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(dy);
rowFilter.ColumnDefinitions.Add(fd);
FpSpread1.ActiveSheetView.RowFilter = rowFilter;
FpSpread1.ActiveSheetView.AutoFilterColumn(1, dy.DisplayName);
FpSpread1.ActiveSheetView.AutoFilterMode = FarPoint.Web.Spread.AutoFilterMode.Enhanced;
}
VB.NETCopy 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, 0, 2, 2).Value = 3
Dim dy As New FarPoint.Web.Spread.DynamicFilterItem(FarPoint.Web.Spread.DynamicFilterType.AboveAverage)
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(dy)
rowFilter.ColumnDefinitions.Add(fd)
FpSpread1.ActiveSheetView.RowFilter = rowFilter
FpSpread1.ActiveSheetView.AutoFilterColumn(1, dy.DisplayName)
FpSpread1.ActiveSheetView.AutoFilterMode = FarPoint.Web.Spread.AutoFilterMode.Enhanced
End Sub

Requirements

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

See Also

© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.