国产一级a片免费看高清,亚洲熟女中文字幕在线视频,黄三级高清在线播放,免费黄色视频在线看

打開APP
userphoto
未登錄

開通VIP,暢享免費電子書等14項超值服

開通VIP
Gridview 增加多個空行(轉(zhuǎn)載)

//
自動填充的行數(shù)
  int numCount = 0;
 
protected void Page_Load(object sender, EventArgs e)
  {
   
if (!Page.IsPostBack)
    {
      GridView1.DataSource
= CreateDataSourceByXianhuiMeng();
      GridView1.DataBind();
    }
  }

 
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
  {
   
if (e.Row.RowType == DataControlRowType.DataRow)
    {
     
// 計算自動填充的行數(shù)
      numCount++;
    }
   
if (e.Row.RowType == DataControlRowType.Footer)
    {
     
// 計算完畢,在此添加缺少的行
      int toLeft = TotalRowCount - numCount;
     
int numCols = GridView1.Rows[0].Cells.Count;

     
for (int i = 0; i < toLeft; i++)
      {
        GridViewRow row
= new GridViewRow(-1, -1, DataControlRowType.EmptyDataRow, DataControlRowState.Normal);
       
for (int j = 0; j < numCols; j++)
        {
          TableCell cell
= new TableCell();
          cell.Text
= " ";
          row.Cells.Add(cell);
        }
        GridView1.Controls[
0].Controls.AddAt(numCount + 1 + i, row);
      }
    }
  }

本站僅提供存儲服務,所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點擊舉報。
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
GridView后臺綁定數(shù)據(jù)列表方法
GridView 特性總結(jié)
GridView內(nèi)容詳解(1)
ASP.NET數(shù)據(jù)表現(xiàn)控件一些比較常見問題集合
(轉(zhuǎn))Gridview學習筆記
GridView簡單合并列
更多類似文章 >>
生活服務
分享 收藏 導長圖 關(guān)注 下載文章
綁定賬號成功
后續(xù)可登錄賬號暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點擊這里聯(lián)系客服!

聯(lián)系客服