zoukankan      html  css  js  c++  java
  • c# 后台 添加datable 数据


    public void AddRows(HtmlTable table(表名),DataTable dt(数据源), string i(自增长))         {                          int j = int.Parse(i);             HtmlTableRow tr0 = new HtmlTableRow();             HtmlTableCell tc = new HtmlTableCell();             tc.Attributes.Add("style","font-size:14px;text-align:center;");             tc.Attributes.Add("colspan", "2");             tc.InnerText = dt.Rows[j]["sbmc"].ToString();             HtmlTableCell tc0 = new HtmlTableCell();             tc0.Attributes.Add("contentEditable", "true");             tc0.Attributes.Add("style", "font-size:14px;text-align:center;");             tc0.InnerText = dt.Rows[j]["xh"].ToString();                          tc.Attributes.Add("contentEditable", "true");             tc0.Attributes.Add("contentEditable", "true");             tr0.Cells.Add(tc);             tr0.Cells.Add(tc0);             table.Rows.Insert(1, tr0);             table.Attributes.Add("border", "1");         }
    再三须慎意,第一莫欺心
  • 相关阅读:
    Death Race
    中国队吃中药了?
    (zt)让我们相亲相爱一百年不动摇
    Subversion & Arfa Karim Randhawa
    要是有时间的话……
    (zt)山王
    (zt)东方红
    Oracle 备份 与 恢复 概述
    Solaris 网络 配置
    RAID 磁盘阵列 详解
  • 原文地址:https://www.cnblogs.com/otsf/p/8520826.html
Copyright © 2011-2022 走看看