当我点击网格行时,它给出正确的值(如cadio,101),但我点击下一步 它给出的值(如cadio,101)是错误的,正确的值将是(Biceps,101)。解释 - 我正在调整这样的行值: 卡迪奥,101 二头肌,101
<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!!!
});