You can also handle events that let you maintain values not typically stored in a bound data source, such as cell Tool Tip text, cell and row error text, cell and row shortcut menu data, and row height data.For more information about implementing virtual mode to manage read/write data with a row-level commit scope, see Walkthrough: Implementing Virtual Mode in the Windows Forms Data Grid View Control.event, which enables the control look up values in the data cache.Virtual mode is necessary only when you need to supplement or replace bound mode. For example, if you call the Auto Resize Rows(Data Grid View Auto Size Rows Mode, Boolean) overload of the Auto Resize Rows method and pass in a value of false for the Boolean parameter, the overload will calculate the ideal heights and widths for cells in the row, but it will adjust the row heights only.
This scenario is particularly useful when working with large amounts of data over a slow network connection or with client machines that have a limited amount of RAM or storage space. When automatic sizing is disabled, you can programmatically set the exact width or height of rows, columns, or headers through the following properties: These methods will resize rows, columns, or headers once rather than configuring them for continuous resizing. Programmatic content-based resizing affects rows, columns, and headers regardless of their visibility.Call the Update Cell Error Text method or the Update Row Error Text method when you change the cell or row error text to ensure that the current value is displayed in the control.Cell and row error glyphs are displayed when the Show Cell Errors and Show Row Errors property values are Used by the control to retrieve or store row height information in the data cache.