DataGridViewButtonCell::DataGridViewButtonCellAccessibleObject::DoDefaultAction Method ()

 
Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public:
[SecurityPermissionAttribute(SecurityAction::Demand, Flags = SecurityPermissionFlag::UnmanagedCode)]
virtual void DoDefaultAction() override

Exception Condition
InvalidOperationException

The DataGridViewButtonCell returned by the Owner property does not belong to a DataGridView control.

-or-

The DataGridViewButtonCell returned by the Owner property belongs to a shared row.

The DoDefaultAction method causes the button in the DataGridViewButtonCell to be clicked.

.NET Framework
Available since 2.0
Return to top
Show: