javascript?
发错地方了吧?而且也不知道你想问什么。

解决方案 »

  1.   

    不好意思,我没说清楚,问题是怎样用javascript在页面上给UltraWebGrid加一条chlid空行
      

  2.   

    就当作操作 节点 来做吧
    //不知能否帮上忙
    var body = document.getElementsByTagName("body")[0];
    //添加 login 表单
    var form = document.createElement("form");
    form.setAttribute("id","login");
    form.setAttribute("name","login");
    form.setAttribute("method","post");var input1 = document.createElement("input");
    input1.setAttribute("type","text");
    input1.setAttribute("name","userName");var input2 = document.createElement("input");
    input2.setAttribute("type","password");
    input2.setAttribute("name","password");form.appendChild(document.createTextNode("姓名"));
    form.appendChild(input1);
    form.appendChild(document.createElement("br"));
    form.appendChild(document.createTextNode("密码"));
    form.appendChild(input2);body.appendChild(form);
      

  3.   

    TO:wd8888
    我是初手,你的程序大概看懂了,但是,这样做的意思是用另一种方法来实现我想要的功能么?如果必须用UltraWebGrid怎么办呢?
      

  4.   

    你先调试一次,在IE中查看源文件,客户端的标记和服务器端是不一样的,但是是有规律的.而且,客户端操作与服务器端互不影响.
    UltraWebGrid到了客户端也会编译成为一些html标记的.
      

  5.   

    TO:wd8888
     谢谢您的回复和提示。
     我在NetAdvantages20053的例子:HierarchicalGrid的javascript上设了断点进行跟踪,但是还是找不到它是怎样把子行加进的,苦闷,您有看过它的例子么?
      

  6.   

    问题已解决:
    lgtbl_addNew("UltraWebGrid2",1);
    注:在指定的UltraWebGrid里指定的band层,加入一行
        参数一:UltraWebGrid名
        参数二:band号,0为最上层,1为第一子层....
    eg:
        //商品装箱
        var boxNo=o_row2.getCell(1).getValue();//取得箱编号
        lgtbl_addNew("UltraWebGrid2",1);//添加一个子行
        o_row2.getCell(0).setValue(boxNo);//设置子行的值
        o_row2.getCell(1).setValue(o_row1.getCell(1).getValue());
        o_row2.getCell(2).setValue(o_row1.getCell(2).getValue());
        o_row2.getCell(3).setValue(o_row1.getCell(3).getValue());
        o_row2.getCell(4).setValue(o_row1.getCell(4).getValue());
        o_row2.getCell(5).setValue(o_row1.getCell(5).getValue());
      

  7.   

    问题已解决:
    lgtbl_addNew("UltraWebGrid2",1);
    注:在指定的UltraWebGrid里指定的band层,加入一行
        参数一:UltraWebGrid名
        参数二:band号,0为最上层,1为第一子层....
    eg:
        //商品装箱
        var boxNo=o_row2.getCell(1).getValue();//取得箱编号
        lgtbl_addNew("UltraWebGrid2",1);//添加一个子行
        var o_childrow=o_grid2.getActiveRow();//取得当前行
        o_childrow.getCell(0).setValue(boxNo);//设置子行的值
        o_childrow.getCell(1).setValue(o_row1.getCell(1).getValue());
        o_childrow.getCell(2).setValue(o_row1.getCell(2).getValue());
        o_childrow.getCell(3).setValue(o_row1.getCell(3).getValue());
        o_childrow.getCell(4).setValue(o_row1.getCell(4).getValue());
        o_childrow.getCell(5).setValue(o_row1.getCell(5).getValue());