Cassie Mod

Cassie Mod

  • NA
  • 488
  • 70.4k

hide several gridview colums at once

Nov 1 2016 4:52 AM
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)