How can I disable editing cells in a WPF Datagrid?

后端 未结 4 879
你的背包
你的背包 2020-12-24 03:58

I\'m constructing 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 wa

4条回答
  •  情深已故
    2020-12-24 04:40

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

    You can also set this value for individual columns in your DataGrid as needed.

提交回复
热议问题