I try to use the IsReadOnly property via binding, but the cell remains editable.
I've got something like this:
<ig:TextColumn Key="MyModel.Value1" IsReadOnly="{Binding Path=MyModel.Enabled1}">
Where Enabled1 is a property of type bool, value true within MyModel.
I tried to add a (dummy-)converter but that didn't do the trick neither...When I change the Key property to MyModel.Enabled1 the grid will correctly show 'True'.
Any suggestions?Thanks!
Hi,
A Column object isn't an actual visual element, which means it doesn't participate in normal DataContext inheritance or even ElementName bindings.
So you'll have to set the Source of the binding yourself to a StaticResource
Hope this helps,
-SteveZ
This won't solve my problem since each row contains cells that can individually be editable or not.
E.g.row 1 allows cells 1 and 2 to be modified while 3 and 4 are lockedrow 2 allows cells 3 and 4 to be modified while 1 and 2 are locked...
Meanwhile I tried it to achieve it by code (InitializeRow event), but when I changed the CellStyle of a cell it changed the styles in all rows.
And another approach was to create an inherited EqualToConditionalFormatRule based on the expression Value true or false, but I'm kind of stuck here as well...
Are there smart possibilities to solve this problem? Locking cells by setting a style based on a FormatRule (with non-static binding) would be a very elegant solution ;-)
Thanks so far, Hoschi