DataGridTableStyle.EndEdit(DataGridColumnStyle, Int32, Boolean) Method

Definition

Requests an end to an edit operation.

C#
public bool EndEdit(System.Windows.Forms.DataGridColumnStyle gridColumn, int rowNumber, bool shouldAbort);

Parameters

gridColumn
DataGridColumnStyle

The DataGridColumnStyle to edit.

rowNumber
Int32

The number of the edited row.

shouldAbort
Boolean

A value indicating whether the operation should be stopped; true if it should stop; otherwise, false.

Returns

true if the edit operation ends successfully; otherwise, false.

Implements

Examples

The following code example calls the BeginEdit method on the current DataGridTableStyle in a System.Windows.Forms.DataGrid control.

C#
private void EditTable(){
   DataGridTableStyle dgt= myDataGrid.TableStyles[0];
   DataGridColumnStyle myCol = dgt.GridColumnStyles[0]; 
      
   dgt.BeginEdit(myCol,1); 
   dgt.EndEdit(myCol, 1, true);
}

Remarks

Similar to the BeginEdit method, the EndEdit method is intended to notify the System.Windows.Forms.DataGrid when an edit operation is ending.

Applies to

Product Versions
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 10

See also