Browse Source

Merge pull request #6570 from workgroupengineering/fixes/Issue_6567

fixes(DataGrid): Issue #6567 New line in Editable DataGrid, Not editable
pull/6572/head
Max Katz 5 years ago
committed by GitHub
parent
commit
d36858ae2d
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 11
      src/Avalonia.Controls.DataGrid/DataGridDataConnection.cs

11
src/Avalonia.Controls.DataGrid/DataGridDataConnection.cs

@ -233,7 +233,7 @@ namespace Avalonia.Controls
else
{
editableCollectionView.EditItem(dataItem);
return editableCollectionView.IsEditingItem;
return editableCollectionView.IsEditingItem || editableCollectionView.IsAddingNew;
}
}
@ -314,7 +314,14 @@ namespace Avalonia.Controls
CommittingEdit = true;
try
{
editableCollectionView.CommitEdit();
if (editableCollectionView.IsAddingNew)
{
editableCollectionView.CommitNew();
}
else
{
editableCollectionView.CommitEdit();
}
}
finally
{

Loading…
Cancel
Save