Access gridview Header Text

Posted by Toashish80 under ASP.NET on 6/14/2011 | Points: 10 | Views : 3085 | Status : [Member] | Replies : 3
I have a gridview created dynamically on the click of a button with textboxes for both header and item templates. User can enter text for both header and item template.
On click of Save button I would like to access the header columns text and the item templates values and save them in the database.




Responses

Posted by: Susanthampy on: 6/15/2011 [Member] [MVP] Bronze | Points: 25
Posted by: Susanthampy on: 6/15/2011 [Member] [MVP] Bronze | Points: 25
Posted by: Ndebata on: 6/15/2011 [Member] Starter | Points: 25

Up
0
Down
Hi
You can access it by
GridView1.Columns[0].HeaderText

Please provide the correct index ( Here 0) to findout the column header text.
Lets say you are adding your column at the last, then you can use GridView1.Columns.Count -1 for getting index of that colunn.

Thanks,
Debata

Toashish80, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response