One of the DataGrid's greatest conveniences is its support for editing. A DataGrid cell switches into edit mode when the user double-clicks it. But the DataGrid lets you restrict this editing ability in several ways:
- DataGrid.IsReadOnly: When this property is True, users can't edit anything.
- DataGridColumn.IsReadOnly: When this property is True, users can't edit any of the values in that column.
- Read-only properties: If your data object has a property with no property setter, the DataGrid is intelligent enough to notice this detail and disable column editing just as if you had set DataGridColumn.IsReadOnly to True. Similarly, if your property isn't a simple text, numeric, or date type, the DataGrid makes it read-only (although ...