Cassie Mod

Cassie Mod

  • 1.5k
  • 488
  • 38.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 ?

Brought to you by: JavaScript SDK for Bold BI dashboard and analytics embedding. Free trial.

Answers (5)