FlexGrid for WPF | ComponentOne
C1.WPF.FlexGrid.4.6.2 Assembly / C1.WPF.FlexGrid Namespace / C1FlexGrid Class / AutoSizeColumns Method / AutoSizeColumns(Int32,Int32,Double,Boolean,Boolean) Method
Index of the first column to resize.
Index of the last column to resize.
Extra width to add to the column, in pixels.
Whether to measure all cells, including those that are not currently visible.
Whether to skip star-sized columns.

In This Topic
    AutoSizeColumns(Int32,Int32,Double,Boolean,Boolean) Method
    In This Topic
    Resizes a column range to fit their content.
    Syntax
    'Declaration
     
    Public Overloads Sub AutoSizeColumns( _
       ByVal startCol As Integer, _
       ByVal endCol As Integer, _
       ByVal extra As Double, _
       ByVal allCells As Boolean, _
       ByVal skipStars As Boolean _
    ) 
    public void AutoSizeColumns( 
       int startCol,
       int endCol,
       double extra,
       bool allCells,
       bool skipStars
    )

    Parameters

    startCol
    Index of the first column to resize.
    endCol
    Index of the last column to resize.
    extra
    Extra width to add to the column, in pixels.
    allCells
    Whether to measure all cells, including those that are not currently visible.
    skipStars
    Whether to skip star-sized columns.
    Remarks
    Setting the allCells parameter to true causes the grid to create and measure cell elements for the entire grid content, including rows and columns that are not currently visible. This option may be very time consuming if the grid contains a lot of data.
    See Also