I am trying to bind the visibility of columns in an Xceed datagrid to the IsChecked value of a checkbox.
<xcdg:DataGridControl ReadOnly="{Binding ElementName=ShowReferenceColumn, Path=IsChecked}">
<xcdg:DataGridControl.Columns>
<xcdg:Column FieldName="Reference" Visible="{Binding ElementName=ShowReferenceColumn, Path=IsChecked}" />
</xcdg:DataGridControl.Columns>
</xcdg:DataGridControl>
The ReadOnly property of the datagrid is getting updated by the chaning of the checkbox IsChecked value, but the visibility of the column is not changing. Am I missing something in the binding on the column?
Edit:
The ReadOnly property here is an example of a property where I was able to get the binding to work. In reality it is not going to be binding to the same checkbox as used for the column visibility.