DataGrid Footer

A

Alexandre Soares

Is it possible to access the footer item in the render method of a datagrid?
So far, I can only find the FooterText of each column using the columns
collection, but that doesn't allow me to find out how many cells are
contained in the Footer item.

Thanks in advance for any hints!
 
A

Alexandre Soares

Playing out with the datagrid I found out that I can access the table inside
it using myDataGrid.Controls[0] and from there access any rows in the
datagrid, even the header, footer and pager. This can be useful for other
people who had the same question :)
 
J

John Saunders

Alexandre Soares said:
Playing out with the datagrid I found out that I can access the table inside
it using myDataGrid.Controls[0] and from there access any rows in the
datagrid, even the header, footer and pager. This can be useful for other
people who had the same question :)

You could also use DataGrid.Items to reference all of the items (rows) in
the DataGrid.
 
S

Scott Allen

Hi John:

Items does not hold header and footer items, only the data bound
items....

--
Scott
http://www.OdeToCode.com

Alexandre Soares said:
Playing out with the datagrid I found out that I can access the table inside
it using myDataGrid.Controls[0] and from there access any rows in the
datagrid, even the header, footer and pager. This can be useful for other
people who had the same question :)

You could also use DataGrid.Items to reference all of the items (rows) in
the DataGrid.
 
J

John Saunders

Scott Allen said:
Hi John:

Items does not hold header and footer items, only the data bound
items....

Whoops. Sorry, Scott, I was thinking about the fact that the ItemCreated and
ItemDataBound events both get called with header and footer items.
--
John Saunders
johnwsaundersiii at hotmail

Alexandre Soares said:
Playing out with the datagrid I found out that I can access the table inside
it using myDataGrid.Controls[0] and from there access any rows in the
datagrid, even the header, footer and pager. This can be useful for other
people who had the same question :)

You could also use DataGrid.Items to reference all of the items (rows) in
the DataGrid.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top