Example to select the object with the row values:
<DataGrid Name="DGWerte"
Margin="10,0,0,0"
AutoGenerateColumns="False"
CanUserAddRows="True"
CanUserDeleteRows="True"
CanUserReorderColumns="False"
CanUserSortColumns="True"
CanUserResizeColumns="True"
CanUserResizeRows="False"
IsSynchronizedWithCurrentItem="True"
SelectionMode="Single"
SelectionUnit="FullRow"
GridLinesVisibility="All"
ToolTip="Tooltip: Delete löscht Zeile"
SelectionChanged="DGWerte_SelectionChanged"
CellEditEnding="DGWerte_CellEditEnding"
Background="White">
<DataGrid.Columns>
….
method-id DGWerte_CellEditEnding.
procedure division using by value sender as object e as type System.Windows.Controls.DataGridCellEditEndingEventArgs.
if DGWerte::SelectedIndex >= 0
set GridZeile to DGWerte::Items::CurrentItem as type WPFApplDataGrid.GridZeile
end-if.