This question is locked. New answers and comments are not allowed.
Hi,
I want the IsReadOnly property of a column to be based on the value of a property of the business object the row is bound to. Say, if one property of the business object the row is bound to is true, the IsReadOnly property of the other column should also be true; however, it seem that the DataContext at the column level is not that of the row but of the parent. So I have my DataContext bound to a ViewModel and the GridView to a collection property of the ViewModel. I get an error from the grid like:
How do I go about doing this with the GridView?
Thanks in advance,
Carlos
I want the IsReadOnly property of a column to be based on the value of a property of the business object the row is bound to. Say, if one property of the business object the row is bound to is true, the IsReadOnly property of the other column should also be true; however, it seem that the DataContext at the column level is not that of the row but of the parent. So I have my DataContext bound to a ViewModel and the GridView to a collection property of the ViewModel. I get an error from the grid like:
System.Windows.Data Error: BindingExpression path error: 'MyBoolProperty' property not found on 'ViewModel' ViewModel' (HashCode=769899). BindingExpression: Path='MyBoolProperty' DataItem='ViewModel' (HashCode=769899); target element is 'Telerik.Windows.Controls.GridViewDataColumn' (Name='null'); target property is 'IsReadOnly' (type 'System.Boolean')..
How do I go about doing this with the GridView?
Thanks in advance,
Carlos