views:

301

answers:

1

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?

+1  A: 

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.

jsmith
Thanks, I had see this post. I was hoping for something easier. I don't like the idea of modifying the source code (for maintability issues when new versions come out).
joerage
Yea, It's Unfortunate they have yet to add an IsReadOnly property to their DataGridRow, there is an IsEnabled feature you can play with however.
jsmith
I will take a look at that, thanks.
joerage