Click here to Skip to main content
15,906,625 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to save all rows and columns in datagridview in wpf... and i want to hide the particular column... Is it possible...? pls any one help me ... am tried Visibility="False" ...but that time it not accept the values ...
Posted

DataGridVeiw is a Window control .. we can not define template for window form control... i was looking for same 2 days before but i could not find any solution.......

But you can do from codebehind file :

dataGridView.Columns[1].Visible = false;
 
Share this answer
 
v2
In WPF,you can have datagrid. TO change its columns visibility,
use like this
CSS
dataGrid1.Columns[0].Visibility = System.Windows.Visibility.Hidden;
 
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