Skip to main content
.NET Framework 4.5.2+

Column.AutoFit() Method

Adjusts the column width to accommodate cell content.

Namespace: DevExpress.Spreadsheet

Assembly: DevExpress.Spreadsheet.v22.2.Core.dll


void AutoFit()


To automatically fit the width of several columns to the content, use the ColumnCollection.AutoFit method.

To set the column width value in required units of measurement, use the Column.Width, Column.WidthInCharacters or Column.WidthInPixels property (see the How to: Specify Row Height or Column Width example).

See Also