Spread Windows Forms 10.0 Product Documentation
FilterColumnDefinition Constructor(Int32,FilterListBehavior)
Example 


Column index
List behavior
Creates a filter column definition with the specified list behavior.
Syntax
'Declaration
 
Public Function New( _
   ByVal columnIndex As Integer, _
   ByVal listBehavior As FilterListBehavior _
)
'Usage
 
Dim columnIndex As Integer
Dim listBehavior As FilterListBehavior
 
Dim instance As New FilterColumnDefinition(columnIndex, listBehavior)
public FilterColumnDefinition( 
   int columnIndex,
   FilterListBehavior listBehavior
)

Parameters

columnIndex
Column index
listBehavior
List behavior
Example
This example creates a filter collection for filtering. (Bound to Northwind.mdb, Employee table)
FarPoint.Win.Spread.NamedStyle instyle = new FarPoint.Win.Spread.NamedStyle();
FarPoint.Win.Spread.NamedStyleim outstyle = new FarPoint.Win.Spread.NamedStyle();
instyle.BackColor = Color.Yellow;
outstyle.BackColor = Color.Aquamarine;
FarPoint.Win.Spread.FilterColumnDefinition fcd = new FarPoint.Win.Spread.FilterColumnDefinition(1, FarPoint.Win.Spread.FilterListBehavior.SortByMostOccurrences
|  
FarPoint.Win.Spread.FilterListBehavior.Default);
FarPoint.Win.Spread.FilterColumnDefinition fcd1 = new FarPoint.Win.Spread.FilterColumnDefinition(2);
FarPoint.Win.Spread.FilterColumnDefinition fcd2 = new FarPoint.Win.Spread.FilterColumnDefinition();
FarPoint.Win.Spread.StyleRowFilter sf = new FarPoint.Win.Spread.StyleRowFilter(fpSpread1.ActiveSheet, instyle, outstyle);
sf.AddColumn(fcd);
sf.AddColumn(fcd1);
sf.AddColumn(fcd2);
fpSpread1.ActiveSheet.RowFilter = sf;
Dim instyle As New FarPoint.Win.Spread.NamedStyle
Dim outstyle As New FarPoint.Win.Spread.NamedStyle
instyle.BackColor = Color.Yellow
outstyle.BackColor = Color.Aquamarine
Dim fcd As New FarPoint.Win.Spread.FilterColumnDefinition(1, FarPoint.Win.Spread.FilterListBehavior.SortByMostOccurrences
Or FarPoint.Win.Spread.FilterListBehavior.Default)
Dim fcd1 As New FarPoint.Win.Spread.FilterColumnDefinition(2)
Dim fcd2 As New FarPoint.Win.Spread.FilterColumnDefinition

Dim sf As New FarPoint.Win.Spread.StyleRowFilter(fpSpread1.ActiveSheet, instyle, outstyle)
sf.AddColumn(fcd)
sf.AddColumn(fcd1)
sf.AddColumn(fcd2)
fpSpread1.ActiveSheet.RowFilter = sf
Requirements

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

See Also

Reference

FilterColumnDefinition Class
FilterColumnDefinition Members
Overload List
FilterListBehavior Enumeration

User-Task Documentation

Customizing the List of Filter Items

 

 


Copyright © GrapeCity, inc. All rights reserved.