我正在开发基于dhtmlx的Web应用程序。在这个应用程序中,我有一个带有网格的屏幕,该网格正在从json文件中获取数据。该屏幕具有添加选项。当我单击添加选项时,我生成一个表单,其中的一个字段是一个组合框,当您单击复选框时启用。我想用来自屏幕网格第一列的数据填充组合。我怎样才能做到这一点?
例如,我希望组合用值“ 1”,“ 2”等填充。我的json文件如下所示:
{
"rows": [{
"id": "2018013108004760145981601",
"data": ["1", "00000002", "6867i", "7630013825739", "154.00"]
},
{
"id": "2018022114420695684268869",
"data": ["2", "00000008", "7775 27 AIO", "", "1600.00"]
}]
}
我在表单构建中使用的代码是这样的:
{type: "block", id: "Block", list: [
{type: "settings", position: "label-left", inputWidth: 200, labelWidth: 150},
{type: "checkbox", name:"check", label: "check", list: [
{type: "newcolumn", offset: 260 }, {type: "combo", name:"combo",value: "combo",connector: "", offsetTop: 7, enableTime: true } ]}
]},