Conditionally making readonly to WPF DataGridCell
问题 I have a situation that needs to conditionally make readonly to wpf datagrid cell. There is IsReadOnly property in DataGridCell. But unfortunately, that property is readonly! Is there any way to do it? ant. 回答1: You should be able to use the DataGrid.BeginningEdit event to conditionally check if the cell is editable and then set the Cancel property on the event args if not. 回答2: The similar solution as Goblin above, but with a little code samples: The idea is to dynamically switch the