Redigera

Dela via


DataGridTableStyle.EndEdit(DataGridColumnStyle, Int32, Boolean) Method

Definition

Requests an end to an edit operation.

public:
 virtual bool EndEdit(System::Windows::Forms::DataGridColumnStyle ^ gridColumn, int rowNumber, bool shouldAbort);
public bool EndEdit (System.Windows.Forms.DataGridColumnStyle gridColumn, int rowNumber, bool shouldAbort);
abstract member EndEdit : System.Windows.Forms.DataGridColumnStyle * int * bool -> bool
override this.EndEdit : System.Windows.Forms.DataGridColumnStyle * int * bool -> bool
Public Function EndEdit (gridColumn As DataGridColumnStyle, rowNumber As Integer, shouldAbort As Boolean) As Boolean

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.

private:
   void EditTable()
   {
      DataGridTableStyle^ dgt = myDataGrid->TableStyles[ 0 ];
      DataGridColumnStyle^ myCol = dgt->GridColumnStyles[ 0 ];
      dgt->BeginEdit( myCol, 1 );
      dgt->EndEdit( myCol, 1, true );
   }
private void EditTable(){
   DataGridTableStyle dgt= myDataGrid.TableStyles[0];
   DataGridColumnStyle myCol = dgt.GridColumnStyles[0]; 
      
   dgt.BeginEdit(myCol,1); 
   dgt.EndEdit(myCol, 1, true);
}
Private Sub EditTable()
    Dim dgt As DataGridTableStyle = myDataGrid.TableStyles(0)
    Dim myCol As DataGridColumnStyle = dgt.GridColumnStyles(0)
    
    dgt.BeginEdit(myCol, 1)
    dgt.EndEdit(myCol, 1, True)
End Sub

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

See also