- 注册时间
- 2013-7-8
- 最后登录
- 2020-8-24
- 阅读权限
- 10
- 积分
- 328
- 精华
- 0
- 帖子
- 101
|
factory 发表于 2013-7-8 17:09
[
{id:"1",name:"张三",
children:[
怎么我设置了nodesField还不行?
代码如下:
<div id="treegrid1" class="mini-treegrid" style="width:700px;height:280px;"
url="../data/treeGridTest.txt" showTreeIcon="true"
treeColumn="taskname" idField="id" resultAsTree="false" nodesField="children"
allowResize="true" expandOnLoad="true"
>
<div property="columns">
<div type="indexcolumn"></div>
<div name="taskname" field="text" width="160" >任务名称</div>
<div field="id" width="80">进度</div>
</div>
</div>
数据结构如下:
[
{id: "base", text: "Base",
children: [
{id: "ajax", text: "Ajax"},
{id: "json", text: "JSON"},
{id: "date", text: "Date"},
{id: "control", text: "Control"},
{id: "messagebox", text: "MessageBox"},
{id: "window", text: "Window"}
]
},
{id: "forms", text: "Forms",
children: [
{id: "button", text: "Button"},
{id: "listbox", text: "ListBox"},
{id: "checkboxlist", text: "CheckBoxList"},
{id: "radiolist", text: "RadioList"},
{id: "calendar", text: "Calendar"},
{id: "textbox", text: "TextBox"},
{id: "password", text: "Password"},
{id: "textarea", text: "TextArea"},
{id: "combobox", text: "ComboBox"},
{id: "datepicker", text: "DatePicker"},
{id: "spinner", text: "Spinner"},
{id: "treeselect", text: "TreeSelect"},
{id: "fileupload", text: "FileUpload"}
]
}
] |
|