Add data in the header dynamically [Resolved]

Posted by Write2varun under ASP.NET on 1/25/2014 | Points: 10 | Views : 732 | Status : [Member] | Replies : 2
0
down vote
favorite
I have a grid in which in creating a header dynamically, it contains total, I'm getting the total from the query and storing it in the hidden field, but value is stored in the

(e.Row.RowType == DataControlRowType.DataRow) 

but the header is getting created in

(e.Row.RowType == DataControlRowType.Header)

how to assign the value in the header text




Responses

Posted by: Write2varun on: 1/25/2014 [Member] Starter | Points: 25

Up
0
Down

Resolved
Solved it: bounded the data in the hidden field before binding the grid

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

Posted by: Snaveen on: 2/13/2014 [Member] Starter | Points: 25

Up
0
Down
Hi,

If you want to bound gridview header dynamically, in that case you just use nested gridview and in parent grid header template you just create one more gridview and onrowdatabound event of parent grid you just bind the child grid.

Try something like above if you face any issue then let me know..

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

Login to post response