WPF Datagrid selection issue when getting data async
<p>I have a simple datagrid </p>

<pre><code>        &lt;DataGrid x:Name="dgSample" ItemsSource="{Binding Items, IsAsync=True}" AutoGenerateColumns="False" SelectionMode="Single" CanUserAddRows="False" CanUserDeleteRows="False" SelectionUnit="FullRow"&gt;
            &lt;DataGrid.Columns&gt;
                &lt;DataGridTextColumn Header="Name" Binding="{Binding Name}" IsReadOnly="True"/&gt;
                &lt;DataGridTextColumn Header="Date" Binding="{Binding Date}" IsReadOnly="True"/&gt;
                &lt;DataGridTemplateColumn Header="Sent" &gt;
                    &lt;DataGridTemplateColumn.CellTemplate&gt;
                        &lt;DataTemplate&gt;
                            &lt;CheckBox IsChecked="{Binding Sent}" IsEnabled="False" HorizontalAlignment="Center"/&gt;
                        &lt;/DataTemplate&gt;
                    &lt;/DataGridTemplateColumn.CellTemplate&gt;
                &lt;/DataGridTemplateColumn&gt;
            &lt;/DataGrid.Columns&gt;
        &lt;/DataGrid&gt;
</code></pre>

<p>I populate this datagrid from the Items object</p>

<p>Code behind:</p>

<pre><code>    public List&lt;Item&gt; Items { get; set;} 

    private async void GetData()
    {
        await Task.Run(() =&gt;
        {
            GetItems();
        });
    }

    private void GetItems()
    {
       Items = facade.GetItems();   
    }
</code></pre>

<p>Everything works fine, I get the data and populate datagrid async. The problem comes when I want to select a row, I can´t. I click on a cell and selection automatically dissapears.</p>

<p>When I populate datagrid sync the problem goes away</p>