WPF Datagrid with some read-only rows

Viewed 21419

I have the need to show some of my WPF Datagrid rows as read only or not depending on a property on my bound model.

How can this be done?

3 Answers

I think the easiest way to do it is to add an IsReadOnly property to the DataGridRow class. There is a detailed article by Nigel Spencer on how to do this here.

Related