OneWay binding throws "TwoWay binding is invalid on Read only property"

Posted by Binary Worrier on Stack Overflow See other posts from Stack Overflow or by Binary Worrier
Published on 2010-05-17T22:00:39Z Indexed on 2010/05/17 22:10 UTC
Read the original article Hit count: 744

Filed under:
|
|

This binding

<tk:DataGridTextColumn Binding="{Binding Path=Id, Mode=OneWay}" 
Header="Sale No." Width="1*" />

Gives this error

A TwoWay or OneWayToSource binding cannot work on the read-only property 'Id' of type . . .

The "Id" property is indeed readonly, I thought though that Mode=OneWay would be sufficient.

I'm tired and I know I'm missing something obvious so I'll apologies now for asking a really dumb question.

Thanks
BW

© Stack Overflow or respective owner

Related posts about xaml

Related posts about wpf