Click or drag to resize
GridControlResizeColWidthsToFit Method (Range, Boolean, RedrawFlags)
Automatically resizes the column widths for a given range of cells.

Namespace: Stingray.Grid
Assembly: Stingray.GridControl (in Stingray.GridControl.dll) Version: 14.0.0.0
Syntax
public bool ResizeColWidthsToFit(
	Range range,
	bool resizeCoveredCells,
	RedrawFlags redraw
)

Parameters

range
Type: Stingray.GridRange
The range of cells.
resizeCoveredCells
Type: SystemBoolean
If true, the covered cells are resized.
redraw
Type: Stingray.GridRedrawFlags
The redraw technique. It can take one of the following values:
UpdateNow
to update the window after each column width change.
Invalidate
to simply invalidate the window area to the right of the first column that is resized.
NoShrinkSize
specifies that the column width should not become smaller: Columns will be enlarged only.

Return Value

Type: Boolean
true if the command is successfully executed; false if the command fails or if the user aborts the operation.
See Also