Skip to content

Commit

Permalink
fix: Issue AvaloniaUI#5637 DataGridTemplateColumn incorrect select te…
Browse files Browse the repository at this point in the history
…mplate when DataGridRow Recycled
  • Loading branch information
workgroupengineering committed Mar 8, 2021
1 parent 52fa38a commit d562022
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Avalonia.Controls.DataGrid/DataGrid.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3343,6 +3343,18 @@ private void CompleteCellsCollection(DataGridRow dataGridRow)
AddNewCellPrivate(dataGridRow, ColumnsItemsInternal[columnIndex]);
}
}
else
{
foreach (var column in Columns.Where(columns => columns is DataGridTemplateColumn))
{

PopulateCellContent(
isCellEdited: false,
dataGridColumn: column,
dataGridRow: dataGridRow,
dataGridCell: dataGridRow.Cells[column.Index]);
}
}
}

private void ComputeScrollBarsLayout()
Expand Down

0 comments on commit d562022

Please sign in to comment.