combogird支持手动查询功能
1 $('#Id').combogrid({ pagination:true, delay:1000, //mote:'remote', showHeader:false, method:'post', dataType:'json', idField:'userCode', textField:'userName', fitColumns:true, url:'../actionpro/action_projects.php?action=load&object=user', columns:[[ {field:'userName',title:'用户名',width:100} ]], keyHandler:{ up:function(){return false;}, down:function(){return false;}, left:function(){return false;}, right:function(){return false;}, enter:function(){return false;}, query:function(keyword){ $(this).combogrid("setValue",keyword); $(this).combogrid("grid").datagrid("reload",{'keyword':keyword}); } }, onChange:function(newValue,oldValue){ window.handInput = true; }, onSelect:function(index,row){ window.selectRow = row; }, onHidePanel:function(){ var userCode = $(this).combogrid('getValue'); if(window.handInput){ if(window.selectRow==null || userCode!=window.selectRow.userCode) { //没有选择或者选项不相等时清除内容 $(this).combogrid('setValue',''); $(this).combogrid("grid").datagrid("reload",{'keyword':''}); }else{} } window.handInput = false; window.selectRow = null; } });
好像乱行了,mark一下,代码多了会忘

浙公网安备 33010602011771号