endEdit method

Future<void> endEdit()

Ends the current editing of a cell in SfDataGrid.

Implementation

Future<void> endEdit() async {
  if (_dataGridStateDetails != null) {
    final DataGridConfiguration dataGridConfiguration =
        _dataGridStateDetails!();
    if (!dataGridConfiguration.allowEditing ||
        dataGridConfiguration.selectionMode == SelectionMode.none ||
        dataGridConfiguration.navigationMode == GridNavigationMode.row) {
      return;
    }

    await dataGridConfiguration.currentCell
        .onCellSubmit(dataGridConfiguration);
  }
}