If you want to be sure what column you're working with, I would make the
column a template column, and put a label (or other control of your
choosing) into the footer template. Then, you can find it by ID with
..findcontrol . This also helps if you decide to rearrange your columns, as
you won't be dependent on the ordering!
"Sharon Tal" <ta*******@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Hi Rick.
Thanks for the idea, it works and its simple.
void Item_Created(Object sender, DataGridItemEventArgs e)
{
if(e.Item.ItemType == ListItemType.Footer)
{
IEnumerator cellEnum = e.Item.Cells.GetEnumerator();
while(cellEnum.MoveNext())
{
TableCell tc = (TableCell)cellEnum.Current;
tc.Text = "some value";
}
}
}
"Rick Spiewak" <ri*********@mindspring.com> wrote in message
news:uV**************@TK2MSFTNGP11.phx.gbl... You can do just about whatever you want in the itemcreated event for the
footer or pager.
"Sharon Tal" <ta*******@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl... Hi to all.
I need to make a grid that sums up columns at the footer.
I have 2 data views one for the grid and one for the summary.
From what i read, i understand that it's not easy to do with the data grid web control.
So i'm looking for a better way.
Thanks.