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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
9 additions and
2 deletions
-
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 |
|
|
|
{ |
|
|
|
|