This sample illustrates optimal fitting of columns and rows based on the content of cells.
Features:
ColWidths.ResizeToFit method is used to resize the column widths.
this.gridControl1.ColWidths.ResizeToFit(GridRangeInfo.Cols(1,5));
RowHeights.ResizeToFit is used to resize the row heights.
this.gridControl1.RowHeights.ResizeToFit(GridRangeInfo.Rows(1,5));