Click here to Skip to main content
15,885,953 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
Hello All,

I am facing difficulty in below situation:

I have WPF datagrid with few columns. I want to show/hide certain
columns based on combobox selection change.

I tried using StaticResources, ObjectDataSource etc options but no use.

What collection I should use & how the binding will happen in XAML?

Thanks in advance.
Posted

1 solution

DataGrid1.Columns(1).Visibility = Windows.Visibility.Collapsed

Now on selection of combobox set visibility of column.

Hopefully this will help u.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900