Pages

8/07/2009

Changing Header Text of GridView Dynamically.. Header Test Change

I am working on a project and find it a bit tricky to change the header text of grid view by data binding.

1. First of all you have to set the property of the page on which you are using grid view.

2. Set the property from the data you brought from the database(or with any data on run time)

3.Now on Page Load do this

GdvMain.Columns[0].HeaderText = heading;

where
GdvMain is the grid view
heading is the property i set(meaning string containing text u want to see at grid view header)

4. This will set the header text of grid view to the text you want.

If you have any queries u are welcome......


0 comments:

Post a Comment

Twitter Delicious Facebook Digg Favorites More