Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

DataGridView.AutoResizeColumns Method

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

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

  NameDescription
Public method AutoResizeColumns() Adjusts the width of all columns to fit the contents of all their cells, including the header cells.
Public method AutoResizeColumns(DataGridViewAutoSizeColumnsMode) Adjusts the width of all columns using the specified size mode.
Protected method AutoResizeColumns(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.
Top

Community Additions

ADD
Show:
© 2015 Microsoft