Struts2 在struts 2 jquery网格的rowselect上,我的rowselect值不正确
当我单击网格的行时,它给出了正确的值,如cadio,101,但我单击next 它给出的值像cadio,101,这是错误的,正确的值是肱二头肌,101。说明-我正在按如下方式记录行值: 卡迪奥,101 二头肌,101Struts2 在struts 2 jquery网格的rowselect上,我的rowselect值不正确,struts2,struts2-jquery,struts2-jquery-grid,Struts2,Struts2 Jquery,Struts2 Jquery Grid,当我单击网格的行时,它给出了正确的值,如cadio,101,但我单击next 它给出的值像cadio,101,这是错误的,正确的值是肱二头肌,101。说明-我正在按如下方式记录行值: 卡迪奥,101 二头肌,101 <s:url id="exerDetailsGridUrl" action="exerDetailsGrid" /> <sjg:grid id="exerDetailsGrid" href="%{exerDetailsGridUrl}" pager="f
<s:url id="exerDetailsGridUrl" action="exerDetailsGrid" />
<sjg:grid id="exerDetailsGrid"
href="%{exerDetailsGridUrl}"
pager="false"
gridModel="exList"
formIds="FilterListForm"
height="500"
width="580"
rowNum="10000"
footerrow="true"
onSelectRowTopics="getExInfoOnRowSelect"
reloadTopics="reloadExerDetailsGrid"
>
<sjg:gridColumn name="exerId" index="exerId" title="Exercise Id" hidden="true" key="true" />
<sjg:gridColumn name="exGroupName" index="exGroupName" title="Group Name" cssStyle="padding-left:100px" />
<sjg:gridColumn name="exerName" index="exerName" title="Exercise Name" />
</sjg:grid>
获得解决方案-删除密钥=真,然后所有工作正常。
$.subscribe('getExInfoOnRowSelect', function(event, data) {
$("#exerId").val(event.originalEvent.id);
alert(event.originalEvent.id);
var grid = event.originalEvent.grid;
var sel_id = grid.jqGrid('getGridParam', 'selrow');
var myCellData = grid.jqGrid('getCell', sel_id, 'exGroupName');
alert(myCellData); //THIS PRINTS THE VALUE i NEED!!!
});