For maximum performance, use programmatic resizing instead so that you can resize at specific times, such as immediately after new data is loaded.
With these values, you can limit which cells are used to calculate the preferred sizes.
The enumerations used by sizing properties and methods have similar values for content-based sizing.
You can customize sizing behaviors when working with derived Data Grid View cell, row, and column types by overriding the Data Grid View Cell. The protected resizing method overloads are designed to work in pairs to achieve an ideal cell height-to-width ratio, avoiding overly wide or tall cells.
For example, you might programmatically resize all columns immediately after loading data, or you might programmatically resize a specific row after a particular cell value has been modified. Get Preferred Width() methods or by calling protected resizing method overloads in a derived Data Grid View control.
The new sizes are automatically calculated to display all cell contents without clipping.