Hi Alberto,
Thanks for using syncfusion support.
We have checked your query. The “Not able to BeginEdit, EditItem is already set" exception occur while editing the cell and try to edit another cell before committing the previous edited cell’s value. If you call the SfDataGrid.View.CommitEdit() method before you perform the action in GridTapped event the edited value is commited in your collection. So you can perform your desired actions further.
|
private int currentCellBeginEdit;
dataGrid.CurrentCellBeginEdit += DataGrid_CurrentCellBeginEdit;
private void DataGrid_CurrentCellBeginEdit(object sender, GridCurrentCellBeginEditEventArgs e)
{
currentCellBeginEdit = e.RowColumnIndex.RowIndex;
}
dataGrid.GridDoubleTapped += DataGrid_GridDoubleTapped;
private void DataGrid_GridDoubleTapped(object sender, GridDoubleTappedEventArgs e)
{
if (e.RowColumnIndex.RowIndex == currentCellBeginEdit)
{
if (dataGrid.View.IsEditingItem)
dataGrid.View.CommitEdit();
}
viewModel.OrdersInfo.RemoveAt(0);
} |
Please let us know, if you need any further assistance.
Regards,
Sivaraman