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