Cellvalidating datagridview in c net
Use content-based automatic resizing with caution when working with large amounts of data.
The value of this property is based on the column's Auto Size Mode property value unless that value is Not Set, in which case the control's Auto Size Columns Mode value is inherited.
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.
If content-based automatic sizing is enabled for one dimension only—that is, for rows but not columns, or for columns but not rows—and Wrap Mode is also enabled, size adjustment also occurs whenever the other dimension changes.
For more information about this mode, see the Column Fill Mode section below. If you configure both rows and columns for content-based automatic sizing and Wrap Mode is enabled, the Data Grid View control will adjust sizes whenever cell contents changed and will use an ideal cell height-to-width ratio when calculating new sizes. For example, if rows but not columns are configured for automatic sizing and Wrap Mode is enabled, users can drag column dividers to change the width of a column and row heights will automatically adjust so that cell contents are still fully displayed. For maximum performance, use programmatic resizing instead so that you can resize at specific times, such as immediately after new data is loaded.
To avoid performance penalties, use the automatic sizing modes that calculate sizes based only on the displayed rows rather than analyzing every row in the control. The new sizes are automatically calculated to display all cell contents without clipping.