jQuery MiniUI

 找回密码
 立即注册
查看: 2646|回复: 1
打印 上一主题 下一主题

treegrid cellendedit _dataSource.ids getNode [复制链接]

Rank: 2

跳转到指定楼层
楼主
发表于 2019-10-15 19:18:09 |只看该作者 |倒序浏览
使用 TreeGrid - CellEdit官网的案例进行修改后,修改idField字段的值后 getNode 根据 idField字段修改后的值获取不到节点

代码:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>CellEdit 单元格编辑</title>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
    <link href="../demo.css" rel="stylesheet" type="text/css" />

    <script src="../../scripts/boot.js" type="text/javascript"></script>
</head>
<body>
    <h1>CellEdit 单元格编辑</h1>

<div id="treegrid1" class="mini-treegrid" style="width:700px;height:280px;"   
    url="../data/tasks.txt" showTreeIcon="true"
    treeColumn="taskname" idField="UID" parentField="ParentTaskUID" resultAsTree="false"  
    allowResize="true" expandOnLoad="true"
    allowCellEdit="true" allowCellSelect="true"  frozenStartColumn="0" frozenEndColumn="1"
>
    <div property="columns">
        <div type="indexcolumn"></div>
        <div field="UID" width="160" >任务名称
            <input property="editor" class="mini-textbox" style="width:100%;" />
        </div>
        <div field="ParentTaskUID" width="160" >任务名称
            <input property="editor" class="mini-textbox" style="width:100%;" />
        </div>
        <div name="taskname" field="Name" width="160" >任务名称
            <input property="editor" class="mini-textbox" style="width:100%;" />
        </div>
        <div field="PercentComplete" width="80">进度
            <input property="editor" class="mini-spinner"  minValue="0" maxValue="100" value="0" style="width:100%;"/>
        </div>
        <div field="Duration" width="60" align="right">工期
            <input property="editor" class="mini-spinner"  minValue="0" maxValue="1000000" value="0" style="width:100%;"/>
        </div>
        <div field="Start" width="80" dateFormat="yyyy-MM-dd">开始日期
            <input property="editor" class="mini-datepicker" style="width:100%;"/>
        </div>
        <div field="Finish" width="80" dateFormat="yyyy-MM-dd">完成日期
            <input property="editor" class="mini-datepicker" style="width:100%;"/>
        </div>
        <div type="checkboxcolumn" field="Critical" trueValue="1" falseValue="0" width="60" dateFormat="yyyy-MM-dd">关键任务            
        </div>                           
    </div>
</div>
  <script>
    function fn(){
        var list = mini.get("treegrid1").getList();
        for(var i=0;i<list.length;i++){
            var aa = JSON.stringify(list)
        }
    }
  </script>

</body>
</html>



附件: 你需要登录才可以下载或查看附件。没有帐号?立即注册

Rank: 8Rank: 8

沙发
发表于 2019-10-16 10:34:02 |只看该作者
先结束编辑,再获取是可以获取到的。

附件: 你需要登录才可以下载或查看附件。没有帐号?立即注册

Archiver|普加软件

GMT+8, 2024-5-5 10:07 , Processed in 1.023300 second(s), 10 queries .

Powered by Discuz! X2

© 2001-2011 Comsenz Inc.

回顶部