OneWay binding migration "TwoWay binding invalid for read-only property"

This binding

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

Gives this error

Binding TwoWay or OneWayToSource cannot work on a read-only property of the 'Id' type.,.

The "Id" property is really read-only, I thought that Mode=OneWaywould be enough.

I'm tired, and I know that I am missing something obvious, so I will apologize now for asking a really stupid question.

Thanks
BW

+3
source share
1 answer

, , DataGridTextColumn Binding.Mode, , - /, DataGrid . IsReadOnly = "true" DataGridTextColumn.

+5

Source: https://habr.com/ru/post/1745885/


All Articles