beginEdit method Null safety

void beginEdit(
  1. RowColumnIndex rowColumnIndex
)

Begins the edit to the given RowColumnIndex in SfDataGrid.

Implementation

void beginEdit(RowColumnIndex rowColumnIndex) {
  if (_dataGridStateDetails != null) {
    final DataGridConfiguration dataGridConfiguration =
        _dataGridStateDetails!();
    if (!dataGridConfiguration.allowEditing ||
        dataGridConfiguration.selectionMode == SelectionMode.none ||
        dataGridConfiguration.navigationMode == GridNavigationMode.row) {
      return;
    }

    dataGridConfiguration.currentCell.onCellBeginEdit(
        editingRowColumnIndex: rowColumnIndex, isProgrammatic: true);
  }
}