Link to home
Start Free TrialLog in
Avatar of mbowling
mbowling

asked on

Hiding Gridview Columns

I'm attempting to hide certain gridview boundfield and templatefield columns programmatically. The following code that references the column index works to hide a column.

GridView1.Columns(20).Visible = False

Is it possible to reference the gridview column by name (maybe the HeaderText) rather than the index (20)?

Thank you

Avatar of muzzy2003
muzzy2003

No, only by iterating through the columns comparing the names.
ASKER CERTIFIED SOLUTION
Avatar of mmarinov
mmarinov

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial