码迷,mamicode.com
首页 > 其他好文 > 详细

在GridView中的每一页末尾添加空行

时间:2017-07-10 01:17:25      阅读:213      评论:0      收藏:0      [点我收藏+]

标签:nbsp   cells   idv   时间   add   amp   protected   int   table   

原文发布时间为:2008-08-03 —— 来源于本人的百度文章 [由搬家工具导入]

protected void GridView1_RowCreated(object sender, GridViewRowEventArgs e)
    {    
        int numCol = GridView1.Columns.Count;
        int numRow = GridView1.Rows.Count;
        if (e.Row.RowType == DataControlRowType.Footer)
        {
            GridViewRow gr = new GridViewRow(-1, -1, DataControlRowType.EmptyDataRow, DataControlRowState.Normal);
            for (int j = 0; j < numCol; j++)
            {
                TableCell cell = new TableCell();
                cell.Text = "&nbsp";
                gr.Cells.Add(cell);
            }
            GridView1.Controls[0].Controls.AddAt(numRow + 1, gr);
        }
    }

在GridView中的每一页末尾添加空行

标签:nbsp   cells   idv   时间   add   amp   protected   int   table   

原文地址:http://www.cnblogs.com/handboy/p/7143816.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!