Spread for ASP.NET 7.0 Product Documentation
MultiValuesFilterItem Constructor(IEnumerable<FilterItemValue>)
See Also  Example Support Options
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > MultiValuesFilterItem Class > MultiValuesFilterItem Constructor : MultiValuesFilterItem Constructor(IEnumerable<FilterItemValue>)


valueItems

Glossary Item Box

Creates an instance of filters with customized settings.

Syntax

Visual Basic (Declaration) 
Public Function New( _
   ByVal valueItems As IEnumerable(Of FilterItemValue) _
)
Visual Basic (Usage)Copy Code
Dim valueItems As IEnumerable(Of FilterItemValue)
 
Dim instance As New MultiValuesFilterItem(valueItems)
C# 
public MultiValuesFilterItem( 
   IEnumerable<FilterItemValue> valueItems
)

Parameters

valueItems

Example

This example creates a filter with multiple values.
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.FilterItemValue test = new FarPoint.Web.Spread.FilterItemValue("10");
FarPoint.Web.Spread.FilterItemValue test1 = new FarPoint.Web.Spread.FilterItemValue("14");
FarPoint.Web.Spread.MultiValuesFilterItem multifilter = new FarPoint.Web.Spread.MultiValuesFilterItem(new FarPoint.Web.Spread.FilterItemValue[] { test, test1 });
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(multifilter);
rowFilter.ColumnDefinitions.Add(fd);
FpSpread1.ActiveSheetView.RowFilter = rowFilter;
FpSpread1.ActiveSheetView.AutoFilterColumn(1, multifilter.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, 1).Value = 30
FpSpread1.Sheets(0).Cells(1, 1).Value = 15
FpSpread1.Sheets(0).Cells(2, 1).Value = 10
Dim test As New FarPoint.Web.Spread.FilterItemValue(10)
Dim test1 As New FarPoint.Web.Spread.FilterItemValue(14)
Dim multifilter As New FarPoint.Web.Spread.MultiValuesFilterItem(New FarPoint.Web.Spread.FilterItemValue() {test, test1})
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(multifilter)
rowFilter.ColumnDefinitions.Add(fd)
FpSpread1.ActiveSheetView.RowFilter = rowFilter
FpSpread1.ActiveSheetView.AutoFilterColumn(1, multifilter.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.