5
Reply

hide several gridview colums at once

Cassie Mod

Cassie Mod

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