Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
160
IsReadOnly bindable?
posted

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!

Parents
  • 40030
    Offline posted

    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

Reply Children