Small fixes

This commit is contained in:
2023-05-25 19:31:43 +02:00
parent fb077bc557
commit ad47aa2a79
3 changed files with 13 additions and 18 deletions

View File

@ -160,7 +160,7 @@ namespace Elwig.Helpers {
}
if (selectedId != null && source != null)
dataGrid.SelectedItem = source.Cast<object>().FirstOrDefault(i => selectedId.Equals(getId(i)));
if (dataGrid.SelectedItem != null)
if (dataGrid.SelectedItem != null && column != null)
dataGrid.CurrentCell = new(dataGrid.SelectedItem, column);
}