FlexGrid for WinForms | ComponentOne
C1.Win.C1FlexGrid Namespace / C1FlexGridRowDetail Class / Setup Method
FlexGrid which displays detail control.
Index of parent detail row.
Example

In This Topic
    Setup Method (C1FlexGridRowDetail)
    In This Topic
    Used to setup control before showing of it.
    Syntax
    'Declaration
     
    
    Public Overridable Sub Setup( _
       ByVal parentGrid As C1FlexGrid, _
       ByVal rowIndex As Integer _
    ) 
    public virtual void Setup( 
       C1FlexGrid parentGrid,
       int rowIndex
    )

    Parameters

    parentGrid
    FlexGrid which displays detail control.
    rowIndex
    Index of parent detail row.
    Remarks
    This method can be overridden in the derived class to apply custom setup behavior of C1FlexGridRowDetail control.
    Example
    The code below shows the hiding of unnecessary grid column:
    public override void Setup(C1FlexGrid parentGrid, int rowIndex)
    {
        // calling base implementation
        base.Setup(parentGrid, rowIndex);
        
        // store C1FlexGrid columns in the variable
        var cols = C1FlexGrid.Cols;
        
        // hide third column
        cols[3].Visible = false;
    }
    See Also