LigerUI $("#formsearch").ligerForm({
fields: [
{ display: "用户", name: "Name", newline: false, width: 220, type: "text", cssClass: "field", attr: { "op": "like"} },
{
display: "部门", name: "SysDepartmentId", textFieldId: "SysDepartmentId222",
newline: false, type: "select", attr: { op: "equal" }, cssClass: "field" ,editor: {
selectBoxWidth: 600,
selectBoxHeight: 300,
textField: 'Name',
valeuField: 'Id',
condition: {
prefixID: 'condition_',
fields: [
{ label: '部门', name: 'Name', type: 'text' }
]
},
grid: {
columns: [
{ display: '编号', name: 'Id', align: 'left', width: 60, frozen: true },
{ display: '部门名称', name: 'Name', id: 'deptName', width: 200, align: 'left' },
{ display: '地址', name: 'Address', width: 80, align: 'left' },
{ display: '说明', name: 'Re', width: 100, align: 'left' }
], url: '../SysDepartment/GetData', isScroll: false, sortName: 'Id',
width: 680
},
onSelected: function (value) {
alert('选中事件:' + value+ liger.get("SysDepartmentId"));
}
}
},
{ name: "SysDepartmentId222", type: "text", newline: false, cssClass: "field" },
],
toJSON: JSON2.stringify
});代码就是这样。这个是用来查询的表单。(这个是要传给ligerGrid的查询参数的)问题是“SysDepartmentId” 获取的是textField的值,但我想要的是valueField 的值。或者在点击事件后将alueField的值给SysDepartmentId222也行。
好的的人那帮一把。谢谢
fields: [
{ display: "用户", name: "Name", newline: false, width: 220, type: "text", cssClass: "field", attr: { "op": "like"} },
{
display: "部门", name: "SysDepartmentId", textFieldId: "SysDepartmentId222",
newline: false, type: "select", attr: { op: "equal" }, cssClass: "field" ,editor: {
selectBoxWidth: 600,
selectBoxHeight: 300,
textField: 'Name',
valeuField: 'Id',
condition: {
prefixID: 'condition_',
fields: [
{ label: '部门', name: 'Name', type: 'text' }
]
},
grid: {
columns: [
{ display: '编号', name: 'Id', align: 'left', width: 60, frozen: true },
{ display: '部门名称', name: 'Name', id: 'deptName', width: 200, align: 'left' },
{ display: '地址', name: 'Address', width: 80, align: 'left' },
{ display: '说明', name: 'Re', width: 100, align: 'left' }
], url: '../SysDepartment/GetData', isScroll: false, sortName: 'Id',
width: 680
},
onSelected: function (value) {
alert('选中事件:' + value+ liger.get("SysDepartmentId"));
}
}
},
{ name: "SysDepartmentId222", type: "text", newline: false, cssClass: "field" },
],
toJSON: JSON2.stringify
});代码就是这样。这个是用来查询的表单。(这个是要传给ligerGrid的查询参数的)问题是“SysDepartmentId” 获取的是textField的值,但我想要的是valueField 的值。或者在点击事件后将alueField的值给SysDepartmentId222也行。
好的的人那帮一把。谢谢
没用过ligerUI
不过很显然的你用liger.get方法是错误的,找找有没有别的方法,比如类似getvalue之类的