请教:easyui combogrid 在动态加载下如何 selectOnNavigation?

shangxuan 2015-04-29 11:23:05
easyui combogrid 在动态加载下如何 selectOnNavigation?
下面的代码有问题在哪儿?去掉 keyHandler这段selectOnNavigation就有效了,有keyHandler这段selectOnNavigation就无效果?请问如何处理。


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>无标题文档</title>
<link rel="stylesheet" type="text/css"
href="/Public/themes/default/easyui.css"/>
<link rel="stylesheet" type="text/css"
href="/Public/themes/icon.css"/>


<script type="text/javascript"
src="/Public/js/jquery-1.11.2.js"></script>
<script type="text/javascript"
src="/Public/js/easyui-lang-zh_CN.js"></script>

<script type="text/javascript"
src="/Public/js/jquery.easyui.min.js"></script>


<script type="text/javascript">
$(document).ready(function () {
$("#cc").combogrid({
keyHandler: {
up: function(e){},
down: function(e){},
left: function(e){},
right: function(e){},
enter: function(e){},
query: function (q, e) {
$("#cc").combogrid("grid").datagrid("reload", {'keyword': q});
$("#cc").combogrid("setValue",q);


}
}
});
$("#cc").combogrid({
url: 'test11.php',
method: 'post',
selectOnNavigation:true
});
}
)
</script>

</head>

<body>


<select id="cc" class="easyui-combogrid" style="width:250px" data-options="
panelWidth: 500,
idField: 'itemid',
textField: 'productname',
mode:'remote',
columns: [[
{field:'itemid',title:'Item ID',width:80},
{field:'productname',title:'Product',width:120},
{field:'listprice',title:'List Price',width:80,align:'right'},
{field:'unitcost',title:'Unit Cost',width:80,align:'right'},
{field:'attr1',title:'Attribute',width:200},
{field:'status',title:'Status',width:60,align:'center'}
]],
pagination : true,
pageSize: 20,
pageList: [20,50],
fitColumns: true,
striped: true
">
</select>
</body>
</html>




test11.php
<?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2015/4/29
* Time: 21:24
*/

$str ='{"total":10,"rows":[
{"productid":"FI-SW-01","productname":"Koi","unitcost":10.00,"status":"P","listprice":36.50,"attr1":"Large","itemid":"EST-1"},
{"productid":"K9-DL-01","productname":"Dalmation","unitcost":12.00,"status":"P","listprice":18.50,"attr1":"Spotted Adult Female","itemid":"EST-10"},
{"productid":"RP-SN-01","productname":"Rattlesnake","unitcost":12.00,"status":"P","listprice":38.50,"attr1":"Venomless","itemid":"EST-11"},
{"productid":"RP-SN-01","productname":"Rattlesnake","unitcost":12.00,"status":"P","listprice":26.50,"attr1":"Rattleless","itemid":"EST-12"},
{"productid":"RP-LI-02","productname":"Iguana","unitcost":12.00,"status":"P","listprice":35.50,"attr1":"Green Adult","itemid":"EST-13"},
{"productid":"FL-DSH-01","productname":"Manx","unitcost":12.00,"status":"P","listprice":158.50,"attr1":"Tailless","itemid":"EST-14"},
{"productid":"FL-DSH-01","productname":"Manx","unitcost":12.00,"status":"P","listprice":83.50,"attr1":"With tail","itemid":"EST-15"},
{"productid":"FL-DLH-02","productname":"Persian","unitcost":12.00,"status":"P","listprice":23.50,"attr1":"Adult Female","itemid":"EST-16"},
{"productid":"FL-DLH-02","productname":"Persian","unitcost":12.00,"status":"P","listprice":89.50,"attr1":"Adult Male","itemid":"EST-17"},
{"productid":"AV-CB-01","productname":"Amazon Parrot","unitcost":92.00,"status":"P","listprice":63.50,"attr1":"Adult Male","itemid":"EST-18"}
]}';

echo $str;


...全文
343 1 打赏 收藏 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
shangxuan 2015-04-30
  • 打赏
  • 举报
回复
有人知道吗??
面向内置式永磁同步电机的MTPA效率优化与双闭环矢量控制对比仿真研究(Simulink仿真实现)内容概要:本文针对内置式永磁同步电机(IPMSM)的控制策略,基于Matlab/Simulink仿真平台,对比研究了最大转矩电流比(MTPA)效率优化控制与双闭环矢量控制两种方法。研究内容涵盖了在不同工况下两种控制策略的动态响应特性、效率表现及系统稳定性,重点分析了MTPA控制在提升电机效率方面的优势,以及双闭环矢量控制在精确转矩响应和宽速域运行中的性能特点。通过搭建详细的电机模型和控制算法模块,仿真验证了各自控制策略的可行性与有效性,为高性能电机驱动系统的设计与优化提供了仿真依据和技术参考。; 适合人群:具备电机控制、电力电子或自动化等相关专业背景,熟悉Matlab/Simulink仿真工具,从事电机驱动系统研发的工程师及研究生。; 使用场景及目标:①为内置式永磁同步电机的高效控制策略选型提供理论与仿真支持;②深入理解MTPA控制与矢量控制的核心原理、实现方法及性能差异;③应用于新能源汽车、工业伺服等对电机效率和动态性能有高要求的领域。; 阅读建议:在学习过程中应结合Simulink模型,仔细分析各控制模块的参数设置与信号流向,并通过改变负载、转速等条件进行仿真测试,对比分析两种控制策略的输出波形,以加深对理论知识的理解和工程应用的认知。

87,984

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧