我现在GridView下面以经打开脚注了。可是只有一行,怎么样才设置两行那。谢谢帮手了。

解决方案 »

  1.   

    思路是这样的。
    首先把footer中合并为一列,然后再这列中添加一个tableif (e.Row.RowType == DataControlRowType.Footer)
            {
                e.Row.Cells[0].ColumnSpan = e.Row.Cells.Count;            Table table = new Table();
                table.Width = Unit.Parse("100%");
                table.GridLines = GridLines.Horizontal;
                table.CellPadding = 2;
                            for (var i = 0; i < 5; i++)
                {
                    TableRow row = new TableRow();
                    for (var j = 0; j < 3; j++)
                    {
                        TableCell cell = new TableCell();
                        cell.Text = "cell" + j.ToString();                    row.Cells.Add(cell);
                    }
                    
                    table.Rows.Add(row);
                }            e.Row.Cells[0].Controls.Add(table);
                e.Row.Cells[0].HorizontalAlign = HorizontalAlign.Center;            for (var i = 1; i < e.Row.Cells.Count; i++)
                {
                    e.Row.Cells[i].Attributes["style"] = "display:none;";
                }
      

  2.   

    不好意思,刚刚是在Orcas中写的
    应该把for中的var 改为int