Spread Windows Forms 7.0 Product Documentation
FilterItemValue Constructor(String)
See Also  Example Support Options
FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > FilterItemValue Class > FilterItemValue Constructor : FilterItemValue Constructor(String)


value
String to compare which displays text

Glossary Item Box

Creates an instance of the ValueFilterItem object.

Syntax

Visual Basic (Declaration) 
Public Function New( _
   ByVal value As String _
)
Visual Basic (Usage)Copy Code
Dim value As String
 
Dim instance As New FilterItemValue(value)
C# 
public FilterItemValue( 
   string value
)

Parameters

value
String to compare which displays text

Example

This example filters based on the specific values of 10 and 14. Select All in the filter list, type 14 in a cell in column 1, and then select the Multi Values filter option.
C#Copy Code
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.FilterItemValue test = new FarPoint.Win.Spread.FilterItemValue(10);
FarPoint.Win.Spread.FilterItemValue test1 = new FarPoint.Win.Spread.FilterItemValue(14);
FarPoint.Win.Spread.MultiValuesFilterItem multifilter = new FarPoint.Win.Spread.MultiValuesFilterItem(new FarPoint.Win.Spread.FilterItemValue[] { test, test1 });     
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(multifilter);
rowFilter.ColumnDefinitions.Add(fd);
fpSpread1.ActiveSheet.RowFilter = rowFilter;
fpSpread1.ActiveSheet.AutoFilterColumn(1, multifilter.DisplayName, 0);
fpSpread1.ActiveSheet.AutoFilterMode = FarPoint.Win.Spread.AutoFilterMode.EnhancedContextMenu;
VB.NETCopy Code
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.Win.Spread.FilterItemValue(10)
Dim test1 As New FarPoint.Win.Spread.FilterItemValue(14)
Dim multifilter As New FarPoint.Win.Spread.MultiValuesFilterItem(New FarPoint.Win.Spread.FilterItemValue() {test, test1})
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(multifilter)
rowFilter.ColumnDefinitions.Add(fd)
FpSpread1.ActiveSheet.RowFilter = rowFilter
FpSpread1.ActiveSheet.AutoFilterColumn(1, multifilter.DisplayName, 0)
FpSpread1.ActiveSheet.AutoFilterMode = FarPoint.Win.Spread.AutoFilterMode.EnhancedContextMenu

Requirements

Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8

See Also

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