easyui combogrid 自动完成功能
程序员文章站
2022-03-30 19:14:41
...
自动完成功能
//初始化被请假人
$("#{$namespace}employee").combogrid({
url:'__URL__/userinfo',
method:'get',
idField:'id',
textField:'name',
mode:'remote',
columns:[[
// {field:'id',title:'ID',width:30},
{field:'name',title:'姓名',width:50},
{field:'dep',title:'部门',width:110},
]],
onSelect:function(index, row){
//console.log(row)
$("#{$namespace}employee").combogrid('setText',row.name);
}
});
<tr style="display: none;">
<th align="center" >
请假人:
</th>
<td>
<input id="{$namespace}employee" name="A_EmployID" type="text" class="easyui- combogrid common" />
</td>
</tr>