This simple WPF-DataGrid
<DataGrid AutoGenerateColumns="False" Height="300" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" Name="dgOriginal" Margin="4,12,0,0"
CanUserAddRows="False" CanUserDeleteRows="False" CanUserReorderColumns="False" IsSynchronizedWithCurrentItem="True"
CanUserSortColumns="False" SelectionMode="Single" SelectionUnit="FullRow">
<DataGrid.Columns>
<DataGridCheckBoxColumn x:Name="col2Checked"/>
<DataGridTextColumn x:Name="col2Name"/>
<DataGridTextColumn x:Name="col2Vorname"/>
</DataGrid.Columns>
which shows a binded list without problems, behaves in a strange way when getting the focus back: First of all a row is selected by the user which makes the datagrid show that row in the selected way (SelectedItem and also CurrentItem contain the selected object). Then the focus is given to another control. In this status - the selection is still shown - SelectedItem is still there while CurrentItem is null! And then the focus comes back by using the TAB-Button. That makes the CurrentItem to be the first object that is shown while the SelectedItem isn't changed. So CurrentItem doesn't go together with SelectetItem in that state which is to be seen in the DataGrid. And I think to myself whats that good for...
My qustion is: How to advice the DataGrid to have the same CurrentItem that was selected before the focus was lost? And how is it possible to synchronize CurrentItem und SelectedItem?
I hope for a simple solution! You would help me a lot. Thanks in advance...