SelectedIndex and SelectedItem are invalid when SelectionUnit=Cell

Nov 11, 2008 at 9:52 AM
If I set SelectionUnit=FullRow, I can access SelectedItem and SelectedIndex.
If I set SelectionUnit=Cell, then SelectedIndex is always -1, and SelectedItem is null.

How I can access item from current row when SelectionUnit=Cell?
Nov 11, 2008 at 10:05 AM
Now I see only one way:

 DataGridCellInfo cell = (DataGridCellInfo)myDataGrid1.SelectedCells[0];

cell.Item is that to need

but maybe there is more elegant way?