Hossein
Hossein

Reputation: 26014

How can i hide a column in a gridview dynamically using C#?

Is there a way that i can hide a column ( or some columns ) in a gridView dynamically?

Upvotes: 0

Views: 1850

Answers (1)

Schokea
Schokea

Reputation: 708

You'll probably have to assign some values to the clicks or events so that when they happen you can write something like this:

GridView1.Columns[YouEventValue].Visible = false;

Where YourEventValue is a variable that is assigned a number based on what event just happened.

Upvotes: 1

Related Questions