Search code examples
c#wpfwpfdatagrid

Error retrieving a value from DataGrid


I am trying to retrieve the value for a WPF DataGrid cell for DataGrid Helper class, but I get the following error:

Unable to convert system.Windows.Controls.DataGridCell to String

If cell value is 90 I am getting Below Value

system.Windows.Controls.DataGridCell 90


Solution

  • I don't know your code, anyway, I try. Have you tried to insert this?

    MyDataGridCell.Content
    

    This should return to you the content of the cell.

    If you have still problems, post your code.