DataGridViewAutoSizeModeEventArgs(Boolean) Constructor

Definition

Initializes a new instance of the DataGridViewAutoSizeModeEventArgs class.

public:
 DataGridViewAutoSizeModeEventArgs(bool previousModeAutoSized);
public DataGridViewAutoSizeModeEventArgs (bool previousModeAutoSized);
new System.Windows.Forms.DataGridViewAutoSizeModeEventArgs : bool -> System.Windows.Forms.DataGridViewAutoSizeModeEventArgs
Public Sub New (previousModeAutoSized As Boolean)

Parameters

previousModeAutoSized
Boolean

true if the AutoSizeRowsMode property was previously set to any DataGridViewAutoSizeRowsMode value other than None or the RowHeadersWidthSizeMode property was previously set to any DataGridViewRowHeadersWidthSizeMode value other than DisableResizing or EnableResizing; otherwise, false.

Remarks

When implementing a source for DataGridView.AutoSizeRowsModeChanged and DataGridView.RowHeadersWidthSizeModeChanged events, pass in true for previousModeAutoSized if the DataGridView already had an automatic resizing mode and the new mode is different. Otherwise, pass in false for previousModeAutoSized.

Applies to

See also