Amigos, boa tarde
Em 1 gridview, tenho q somar as 24 colunas existentes, ja fiz o código para somar pelo menos 1, porem não me retorna nada embaixo no footer
protected void gvForn_DataBound(object sender, EventArgs e)
{
decimal total = 0;
foreach (GridViewRow row in gvForn.Rows)
{
if (row.Cells[3].Text == "")
{
total = 0;
}
else
{
total = decimal.Parse(row.Cells[3].Text);
}
}
GridViewRow footer = gvForn.FooterRow;
footer.Cells[3].ColumnSpan = 3;
footer.Cells[3].HorizontalAlign = HorizontalAlign.Right;
footer.Cells[3].Text = string.Format("total", total);
}