可以的,在DataGrid的ItemDataBound事件中进行运算,把结果输出到footer上

解决方案 »

  1.   

    怎么人人都问我要代码?
    Protected int totalValue=0;
    private void DataGrid1_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
    {
    this.totalValue +=(int)e.Item.Cells["calculateColumn"].Text 
    }
    最后将这个结果放入footer中。
    这个不用我教你了吧 ,footer的行index是Pagesize+2
      

  2.   

    谢谢,不过呢,救人救到底,我的footer代码怎么不显示?
    我再加点分,不好意思~~~~
      

  3.   

    不好意思,忘了把show fooder设置为true ~~~~~:)
      

  4.   

    this.totalValue +=Converter.ToInt32(e.Item.Cells["calculateColumn"].Text)