Rediger

Del via


DataGridViewButtonCell.KeyDownUnsharesRow(KeyEventArgs, Int32) Method

Definition

Indicates whether a row is unshared if a key is pressed while the focus is on a cell in the row.

protected:
 override bool KeyDownUnsharesRow(System::Windows::Forms::KeyEventArgs ^ e, int rowIndex);
protected override bool KeyDownUnsharesRow (System.Windows.Forms.KeyEventArgs e, int rowIndex);
override this.KeyDownUnsharesRow : System.Windows.Forms.KeyEventArgs * int -> bool
Protected Overrides Function KeyDownUnsharesRow (e As KeyEventArgs, rowIndex As Integer) As Boolean

Parameters

e
KeyEventArgs

A KeyEventArgs that contains the event data.

rowIndex
Int32

The index of the cell's parent row.

Returns

true if the user pressed the SPACE key without modifier keys; otherwise, false.

Remarks

The KeyDownUnsharesRow method is called just before the OnKeyDown method. It must return true if the call to OnKeyDown with the same KeyEventArgs argument has the effect of unsharing the row rowIndex. It should return false otherwise.

For more information about row sharing, see Best Practices for Scaling the Windows Forms DataGridView Control.

Applies to

See also