Spread Windows Forms 13.0 Product Documentation
FarPoint.Win.Spread Assembly / FarPoint.Win.Spread Namespace / FilterColumnDefinition Class / ColumnIndex Property
Example


In This Topic
    ColumnIndex Property (FilterColumnDefinition)
    In This Topic
    Gets the column index.
    Syntax
    'Declaration
     
    Public ReadOnly Property ColumnIndex As Integer
    'Usage
     
    Dim instance As FilterColumnDefinition
    Dim value As Integer
     
    value = instance.ColumnIndex
    public int ColumnIndex {get;}

    Property Value

    Integer column index
    Example
    This example returns the index of the column set 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;
    
    textBox1.Text = fcd2.ColumnIndex.ToString();
    
    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
    
    TextBox1.Text = fcd2.ColumnIndex.ToString()
    See Also