WPF Toolkit DataGrid SelectionChanged Getting Cell Value

Posted by Dan Bater on Stack Overflow See other posts from Stack Overflow or by Dan Bater
Published on 2010-01-27T17:30:58Z Indexed on 2010/03/11 5:48 UTC
Read the original article Hit count: 1556

Filed under:
|
|
|

Hi,

Please help me, Im trying to get the value of Cell[0] from the selected row in a SelectionChangedEvent.

I am only managing to get lots of different Microsoft.Windows.Controls and am hoping im missing something daft.

Hoping I can get some help from here...

    private void datagrid_SelectionChanged(object sender, SelectionChangedEventArgs e)
    {
        Microsoft.Windows.Controls.DataGrid _DataGrid = sender as Microsoft.Windows.Controls.DataGrid;
    }

I was hoping it would be something like...

_DataGrid.SelectedCells[0].Value;

However .Value isn't an option....

Many many thanks this has been driving me mad! Dan

© Stack Overflow or respective owner

Related posts about wpf

Related posts about datagrid