This question is locked. New answers and comments are not allowed.
Hi,
I'm trying to bind a boolean value to the IsVisible property of a GridViewDataColumn to show/hide a column through MVVM pattern.
I have a viewmodel with a "ShowNameColumn" boolean property. When I set this property, I raise a onpropertychanged event to tell the view to refresh the property value.
This property is bound to IsVisible property of my gridviewcolumn like this :
But I have an exception when running this :
AG_E_PARSER_BAD_PROPERTY_VALUE [Line: 27 Position: 74]
So my first question is :
When you uyse databindings on gridviewDataColumn, DataMemberBinding will try to get the value from the current bound item that gridview is working on, but is I use binding on other properties like IsVisible, does your gridview get the value from the datacontext of the view or from the item the gridview is parsing ?
My second question :
How can I Show/Hide a column through binding ?
Thanks,
Regards,
Steeve
I'm trying to bind a boolean value to the IsVisible property of a GridViewDataColumn to show/hide a column through MVVM pattern.
I have a viewmodel with a "ShowNameColumn" boolean property. When I set this property, I raise a onpropertychanged event to tell the view to refresh the property value.
This property is bound to IsVisible property of my gridviewcolumn like this :
<telerikGridView:GridViewDataColumn Width="5*" IsVisible={Binding ShowNameColumn} DataMemberBinding="{Binding Name}" Header="Name" /> |
But I have an exception when running this :
AG_E_PARSER_BAD_PROPERTY_VALUE [Line: 27 Position: 74]
So my first question is :
When you uyse databindings on gridviewDataColumn, DataMemberBinding will try to get the value from the current bound item that gridview is working on, but is I use binding on other properties like IsVisible, does your gridview get the value from the datacontext of the view or from the item the gridview is parsing ?
My second question :
How can I Show/Hide a column through binding ?
Thanks,
Regards,
Steeve