Επεξεργασία

Κοινή χρήση μέσω


DataGridView.OnRowContextMenuStripNeeded Method

Definition

Raises the RowContextMenuStripNeeded event.

protected:
 virtual void OnRowContextMenuStripNeeded(System::Windows::Forms::DataGridViewRowContextMenuStripNeededEventArgs ^ e);
protected virtual void OnRowContextMenuStripNeeded (System.Windows.Forms.DataGridViewRowContextMenuStripNeededEventArgs e);
abstract member OnRowContextMenuStripNeeded : System.Windows.Forms.DataGridViewRowContextMenuStripNeededEventArgs -> unit
override this.OnRowContextMenuStripNeeded : System.Windows.Forms.DataGridViewRowContextMenuStripNeededEventArgs -> unit
Protected Overridable Sub OnRowContextMenuStripNeeded (e As DataGridViewRowContextMenuStripNeededEventArgs)

Parameters

Remarks

Raising an event invokes the event handler through a delegate. For more information, see Handling and Raising Events.

The OnRowContextMenuStripNeeded method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

Notes to Inheritors

When overriding OnRowContextMenuStripNeeded(DataGridViewRowContextMenuStripNeededEventArgs) in a derived class, be sure to call the base class' OnRowContextMenuStripNeeded(DataGridViewRowContextMenuStripNeededEventArgs) method so that registered delegates receive the event.

Applies to

See also