Browse Source
Merge pull request #6509 from workgroupengineering/fixes/Issue_6508
fixes(DataGrid): Issue #6508 does not re-enter the edit mode after pressing ESC
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
13 additions and
3 deletions
-
src/Avalonia.Controls.DataGrid/DataGrid.cs
|
|
|
@ -4489,17 +4489,27 @@ namespace Avalonia.Controls |
|
|
|
element = dataGridColumn.GenerateEditingElementInternal(dataGridCell, dataGridRow.DataContext); |
|
|
|
if (element != null) |
|
|
|
{ |
|
|
|
// Subscribe to the new element's events
|
|
|
|
element.Initialized += EditingElement_Initialized; |
|
|
|
|
|
|
|
dataGridCell.Content = element; |
|
|
|
if (element.IsInitialized) |
|
|
|
{ |
|
|
|
PreparingCellForEditPrivate(element as Control); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
// Subscribe to the new element's events
|
|
|
|
element.Initialized += EditingElement_Initialized; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
// Generate Element and apply column style if available
|
|
|
|
element = dataGridColumn.GenerateElementInternal(dataGridCell, dataGridRow.DataContext); |
|
|
|
dataGridCell.Content = element; |
|
|
|
} |
|
|
|
|
|
|
|
dataGridCell.Content = element; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
private void PreparingCellForEditPrivate(Control editingElement) |
|
|
|
|