解决方案 »

  1.   

    以前写的,你参考一下http://topic.csdn.net/u/20110820/00/238cba9a-eb6a-495d-a01d-e1d64b98f738.html
      

  2.   

    Row_databound事件里面 
    if(e.Row.RowType==DataControlRowType.Footer){
                   e.Row.Cells[0].Text = "合计";
                e.Row.Cells[1].ColumnSpan = 5;
                    }
      

  3.   

    谢谢大家的帮助。最后终于找到解决办法了。贴出来与大家分享
    if (e.Row.RowType == DataControlRowType.Footer)
       {
       TableCell cell = new TableCell();
       cell.ColumnSpan = e.Row.Cells.Count;
       cell.Text = "总计:条数";(这里可以随便写,相当于已将单元格合并了)
       cell.HorizontalAlign = HorizontalAlign.Right;
       e.Row.Cells.Clear();
       e.Row.Cells.Add(cell);
       }
    引用至:http://topic.csdn.net/u/20090611/23/5487fde9-18f1-44e2-985e-b1fb92ca7a94.html
    23楼回复。