This is a migrated thread and some comments may be shown as answers.

How to hide or show a GridViewDataColumn

1 Answer 1252 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jerry
Top achievements
Rank 1
Jerry asked on 22 Mar 2016, 07:57 PM

I have a RadGridView in my Silverlight application. I am using MVVM with this application.

I would like to show or hide a GridViewDataColumn column based on a bool property in my Model/ViewModel called ShowAuditColumn.

This works:

<controls:GridViewDataColumn IsVisible="False"/>

 

But I'd like to use the following. But nothing happens. Should the following work?

<controls:GridViewDataColumn IsVisible="{Binding Model.ShowAuditColumn}"/>

 

How can I hide of show a column and bind it to a bool property?

 

1 Answer, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 25 Mar 2016, 08:52 AM
Hello Jerry,

For your convenience, I prepared an example to demonstrate how to achieve the desired behavior. Please take a look at the implementation and consider how this approach fits your scenario.

You may take a look at this forum thread for more detailed information on the matter

I hope that this helps. Should you have any other questions, do not hesitate to contact us.


Regards,
Martin Vatev
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Tags
GridView
Asked by
Jerry
Top achievements
Rank 1
Answers by
Martin
Telerik team
Share this question
or