DataGridView.AutoResizeColumn Method

 

Adjusts the width of the specified column to fit the contents of its cells.

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

NameDescription
System_CAPS_pubmethodAutoResizeColumn(Int32)

Adjusts the width of the specified column to fit the contents of all its cells, including the header cell.

System_CAPS_pubmethodAutoResizeColumn(Int32, DataGridViewAutoSizeColumnMode)

Adjusts the width of the specified column using the specified size mode.

System_CAPS_protmethodAutoResizeColumn(Int32, DataGridViewAutoSizeColumnMode, Boolean)

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

Return to top
Show: