Spread for ASP.NET 11 Product Documentation
AddColumn(Int32,FilterListBehavior) Method
Example 


FarPoint.Web.Spread Assembly > FarPoint.Web.Spread Namespace > DefaultRowFilter Class > AddColumn Method : AddColumn(Int32,FilterListBehavior) Method
Column index
FilterListBehavior object that contains the list behavior
Adds a filter column definition to the row filter with the specified list behavior.
Syntax
'Declaration
 
Public Overloads Sub AddColumn( _
   ByVal viewColumnIndex As Integer, _
   ByVal listBehavior As FilterListBehavior _
) 
'Usage
 
Dim instance As DefaultRowFilter
Dim viewColumnIndex As Integer
Dim listBehavior As FilterListBehavior
 
instance.AddColumn(viewColumnIndex, listBehavior)
public void AddColumn( 
   int viewColumnIndex,
   FilterListBehavior listBehavior
)

Parameters

viewColumnIndex
Column index
listBehavior
FilterListBehavior object that contains the list behavior
Example
This example sets a row filter.
FarPoint.Web.Spread.NamedStyle instyle = new FarPoint.Web.Spread.NamedStyle();
FarPoint.Web.Spread.NamedStyle outstyle = new FarPoint.Web.Spread.NamedStyle();
instyle.BackColor = Color.Yellow; 
outstyle.BackColor = Color.Aquamarine;
FarPoint.Web.Spread.StyleRowFilter sf = new FarPoint.Web.Spread.StyleRowFilter(FpSpread1.Sheets[0], instyle, outstyle);
sf.AddColumn(new FarPoint.Web.Spread.FilterColumnDefinition(1));
FpSpread1.Sheets[0].RowFilter = sf;
Dim instyle As New FarPoint.Web.Spread.NamedStyle() 
Dim outstyle As New FarPoint.Web.Spread.NamedStyle()
instyle.BackColor = Color.Yellow
outstyle.BackColor = Color.Aquamarine
Dim sf As New FarPoint.Web.Spread.StyleRowFilter(FpSpread1.Sheets(0), instyle, outstyle)
sf.AddColumn(New FarPoint.Web.Spread.FilterColumnDefinition(1))
FpSpread1.Sheets(0).RowFilter = sf
See Also

Reference

DefaultRowFilter Class
DefaultRowFilter Members
Overload List