How to disable datagrid cell edit?
+1
A:
The DataGrid columns (like DataGridTextColumn) have an IsReadOnly property, just set it to "True".
<tk:DataGridTextColumn IsReadOnly="True" Binding="{Binding Path=MyData}" Header="My header" />
John Myczek
2009-05-27 15:38:10
A bit simpler than what I suggested! Am I right in thinking the ReadOnly columns weren't in the CTP of the DataGrid control when it came out last year? Seems I need to refresh my knowledge.
Xiaofu
2009-05-27 15:43:49
Right, IsReadOnly was not in the early releases of the DataGrid. I forget exactly when it was added.
John Myczek
2009-05-27 18:27:55