Anyone know how to gain access to a datagrid's header and footer rows if you're not inside a datagrid item event handler? e.g. I want to bind a datagrid, then later in the code update a value in the footer...
You can use the DataGrid's Items property which will return a DataGridItem for each Item (so you can just pass in the index of the relevant Item you want).
Also, if you use the latest version of the framework, there is a FooterRow property for the GridView control.
I'm using ASP.NET 1.1 at the moment. Iterating through DataGrid items only gives me items of type Item or AlternatingItem so neither Header nor Footer...?
OK, maybe it isn't stored in the Items collection then (I don't have 1.1 here to test). You could try seeing if they exist in the Control collection e.g.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.