DataGrid.CancelEdit Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Invokes the CancelEditCommand command for the cell or row currently in edit mode.
Overloads
CancelEdit() |
Invokes the CancelEditCommand command for the cell or row currently in edit mode. |
CancelEdit(DataGridEditingUnit) |
Invokes the CancelEditCommand command for the specified cell or row in edit mode. |
CancelEdit()
Invokes the CancelEditCommand command for the cell or row currently in edit mode.
public:
bool CancelEdit();
public bool CancelEdit ();
member this.CancelEdit : unit -> bool
Public Function CancelEdit () As Boolean
Returns
true
if the current cell or row exits edit mode, or if no cells or rows are in edit mode; otherwise, false
.
Remarks
If a cell is currently in edit mode, the CancelEdit method cancels the cell edit, but not any pending row edits. If a cell is not in edit mode, CancelEdit cancels all pending row edits.
Applies to
CancelEdit(DataGridEditingUnit)
Invokes the CancelEditCommand command for the specified cell or row in edit mode.
public:
bool CancelEdit(System::Windows::Controls::DataGridEditingUnit editingUnit);
public bool CancelEdit (System.Windows.Controls.DataGridEditingUnit editingUnit);
member this.CancelEdit : System.Windows.Controls.DataGridEditingUnit -> bool
Public Function CancelEdit (editingUnit As DataGridEditingUnit) As Boolean
Parameters
- editingUnit
- DataGridEditingUnit
One of the enumeration values that specifies whether to cancel row or cell edits.
Returns
true
if the current cell or row exits edit mode; otherwise, false
.
Remarks
This method reverts any pending editing changes for the specified DataGridEditingUnit and exits edit mode.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: I hele 2024 udfaser vi GitHub-problemer som feedbackmekanisme for indhold og erstatter det med et nyt feedbacksystem. Du kan få flere oplysninger under:Indsend og få vist feedback om