HtmlTable 点击按钮添加一行数据,要求可以不停的添加,但每次点按钮后就只有一行数据!

解决方案 »

  1.   


    table.rows.add()
    viewsate["aa"]=table;
    gridview.datasource=table;
    第二次刷新的时候
    table=viewsatte["aa"];
    table.rows.add()
    viewsate["aa"]=table;
    gridview.datasource=table;
      

  2.   


    function addrow()
    {
    var self=this; 
    var tr = self.table1.insertRow(-1),td1= tr.insertCell(-1),td2= tr.insertCell(-1),td3= tr.insertCell(-1),td4= tr.insertCell(-1),td5= tr.insertCell(-1),td6= tr.insertCell(-1),td7= tr.insertCell(-1),td8= tr.insertCell(-1),td9= tr.insertCell(-1),td10= tr.insertCell(-1);
    }
      

  3.   

    HtmlTable不支持viewstate
    换成DataTable后搞定