ComponentOne FlexPivot for WinForms
C1.Win.FlexPivot.4.8 Assembly / C1.Win.FlexPivot Namespace / C1FlexPivotGrid Class / AutoSizeCols Method / AutoSizeCols(Int32,Int32,Int32,Int32,Int32,AutoSizeFlags) Method
Top row in the range.
Left column in the range.
Bottom row in the range.
Right column in the range.
Amount of extra space, in pixels, to add to the column widths.
Flags that control auto-sizing options.

In This Topic
    AutoSizeCols(Int32,Int32,Int32,Int32,Int32,AutoSizeFlags) Method
    In This Topic
    Adjusts the width of a column range to fit the data in a cell range.
    Syntax
    'Declaration
     
    Public Overloads Overridable Sub AutoSizeCols( _
       ByVal topRow As Integer, _
       ByVal leftCol As Integer, _
       ByVal bottomRow As Integer, _
       ByVal rightCol As Integer, _
       ByVal extraSpace As Integer, _
       ByVal flags As AutoSizeFlags _
    ) 
    public virtual void AutoSizeCols( 
       int topRow,
       int leftCol,
       int bottomRow,
       int rightCol,
       int extraSpace,
       AutoSizeFlags flags
    )

    Parameters

    topRow
    Top row in the range.
    leftCol
    Left column in the range.
    bottomRow
    Bottom row in the range.
    rightCol
    Right column in the range.
    extraSpace
    Amount of extra space, in pixels, to add to the column widths.
    flags
    Flags that control auto-sizing options.
    Remarks

    By default, the C1.Win.C1FlexGrid.C1FlexGridBase.AutoSizeCols method measures every cell in each column, taking into account the cell contents and style.

    If the grid has a large number of rows, you can improve performance by using the topRow and bottomRow parameters to specify a row range. You can include only a few hundred rows in the process, and add some extra spacing for safety.

    See Also