jQuery MiniUI
标题:
treegrid cellendedit _dataSource.ids getNode
[打印本页]
作者:
kay
时间:
2019-10-15 19:18:09
标题:
treegrid cellendedit _dataSource.ids getNode
使用 TreeGrid - CellEdit官网的案例进行修改后,修改idField字段的值后 getNode 根据 idField字段修改后的值获取不到节点
[attach]12487[/attach]
代码:
<!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>
作者:
felt
时间:
2019-10-16 10:34:02
先结束编辑,再获取是可以获取到的。
[attach]12489[/attach]
欢迎光临 jQuery MiniUI (http://miniui.com/discuss/)
Powered by Discuz! X2