DataGridTableStyle.BeginEdit(DataGridColumnStyle, Int32) Method
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.
Requests an edit operation.
public:
virtual bool BeginEdit(System::Windows::Forms::DataGridColumnStyle ^ gridColumn, int rowNumber);
public bool BeginEdit(System.Windows.Forms.DataGridColumnStyle gridColumn, int rowNumber);
abstract member BeginEdit : System.Windows.Forms.DataGridColumnStyle * int -> bool
override this.BeginEdit : System.Windows.Forms.DataGridColumnStyle * int -> bool
Public Function BeginEdit (gridColumn As DataGridColumnStyle, rowNumber As Integer) As Boolean
- gridColumn
- DataGridColumnStyle
The DataGridColumnStyle to edit.
- rowNumber
- Int32
The number of the edited row.
true
, if the operation succeeds; otherwise, false
.
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
The BeginEdit method is intended to notify the System.Windows.Forms.DataGrid control when the user has begun an editing operation. When the control is in edit mode, multiple edits can be made and the constraints will be temporarily unenforced.
Call the EndEdit method to quit the edit mode.
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 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: