Completed
Last Updated: 15 Mar 2023 11:38 by ADMIN
Release 5.1.0
atlanta
Created on: 18 Oct 2022 13:02
Category: DataGrid
Type: Bug Report
0
DataGrid: Selected Style is not applied when selected item is initially set

When the selected item is set initially, the selected style is not applied to the row/cell.

Workaround: You can use a Dispatcher to workaround the issue, code looks as follows:

this.Dispatcher.StartTimer(TimeSpan.FromMilliseconds(200), () =>
        {
            if (dataGrid.SelectedItem == null)
            {
                dataGrid.SelectItem(viewModel.PersonCollection.First());
            }
            return false;
        });

0 comments