I have an ItemTemplate Label inside Gridview which I haven’t bound with any DataField.
I have userId as one of the columns of GridView.
Based on the userId column, I want to get total no of assets acquired by the User. The totalNo doesn’t exists in the database. I have to manually fire a query and get total no of row counts.
Now, how to put this rowCount for each user inside GridView?
Any ideas?
I have tried onRowDataBound and FindControl, but how do I get rowIndex for that particular user?
You add an event function for the DataBound on your GridView and when its render the Header you can change it like: