I have a tab menu and each tabitem contains a toolkit datagrid. I want to change the datagrid cell color if that cell is edited and retain the changed color even if the selected row or tab is changed. I was able to retain the changed
color for selected row changed.
DataGridRow row = (DataGridRow)DataGrid.ItemContainerGenerator.ContainerFromIndex(index) and passing this row to the Datagrid.Columns[index].GetCellContents(row).
But the problem is this seems to work only for the first time when the datagrid is assigned to the observable collection and on the subsequent tab changes or refreshing datagrid, above code is returning null for the row object.
I have also tried this VisualTreeHelper and finding child of the datagrid but it is also returning null for the second time.For the first run both the approaches works smoothly.