DataGridView.AutoResizeColumns Method

 

Adjusts the width of all columns to fit the contents of their cells.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

NameDescription
System_CAPS_pubmethodAutoResizeColumns()

Adjusts the width of all columns to fit the contents of all their cells, including the header cells.

System_CAPS_pubmethodAutoResizeColumns(DataGridViewAutoSizeColumnsMode)

Adjusts the width of all columns using the specified size mode.

System_CAPS_protmethodAutoResizeColumns(DataGridViewAutoSizeColumnsMode, Boolean)

Adjusts the width of all columns using the specified size mode, optionally calculating the widths with the expectation that row heights will subsequently be adjusted.

Return to top
Show: