5
Answers

hide several gridview colums at once

Cassie Mod

Cassie Mod

8y
290
1
HI,
 
Ive got ( 10 ) gridview colums i want to hide.
 
Now i do it like this:
  1. customersDataGridView.Columns["CustomerNumber"].Visible = false;  
  2. customersDataGridView.Columns["FirstName"].Visible = false;  
  3. customersDataGridView.Columns["lastName"].Visible = false;  
 But is there a faster way  i could do this with less code ?
Answers (5)