I am trying to turn off the isReadOnly property of a WPF Datagrid cell via c#. I need to do this once a user clicks on a row.
I have this so far
private void dgProductItem_PreviewMouseDown(object sender, MouseButtonEventArgs e)
{
DataGrid dg = sender as DataGrid;
if (dg != null)
{
DataGridRow dgr = (DataGridRow)(dg.ItemContainerGenerator.ContainerFromIndex(dg.SelectedIndex));
}
}
But how do I get down to the cell level via the
DataGridRow
So finally I am looking for cell.ISReadOnly = false/true;
Cheers