Stopbyte

How to make DataDrid not editable in WPF?

hello everybody!!

I’m making a DataGrid in Windows Presentation Foundation, and I have a problem. When a user double-clicks on a cell in my DataGrid, the cell goes into edit mode. I want to prevent that. Instead I want users to be able to select the full row - not edit values in it.

please someone can help me?

2 Likes

You can easily use IsReadOnly property on the DataGrid to make it entirely read only. or use IsReadOnly per Column basis to make them read only.

2 Likes

The WPF DataGrid has an IsReadOnly property that you can set to True to ensure that users cannot edit your DataGrid's cells.

1 Like