Inzi Irina Inzi Irina - 1 year ago 108
SQL Question

How to get column name from gridview?

I would like to know how can I get a column name from a gridview? by its number not by name.
like : Name|Age|Birthday: ( so name=0 , age=1 etc...)


Answer Source

You can get it like this :


Or like this :


Rows[0] should be your header row.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download