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

[Solved] Column Visibility is not working using mvvm

1 Answer 140 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.
Sandro
Top achievements
Rank 1
Sandro asked on 24 Aug 2011, 12:01 PM
Hi

We are having difficulty on dynamically set the visibility of gridview column. My project is using mvvm with boolean property that is bind to the visibility of the datagrid column.
The viewmodel is binded to the view on the codebehind. See code below.

Public Sub New(ByVal viewModel As vwmAllergen)

InitializeComponent()

LayoutRoot.DataContext = viewModel

 

End Sub


Note: we should not use the bind coding below for some reason in our prism.

   <UserControl.Resources>

        <ViewModels:vwmAllergen x:Key="ViewAllergen" />

    </UserControl.Resources>


Please help. I hope you could send me example code to solve the issue.

1 Answer, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 24 Aug 2011, 12:17 PM
Hello Sandro,

Please refer to this forum thread for a reference.
 

Best wishes,
Maya
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Tags
GridView
Asked by
Sandro
Top achievements
Rank 1
Answers by
Maya
Telerik team
Share this question
or