I am using jQuery and jQuery Grid 3.5.1 plugin in my Struts 2.1.8
I want to retrieve the multiselected rows on <sj:submit>
button. I used onClickTopics
for submit button.The jQuery code for retrieving grid rows is as:
$.subscribe('getrows',function(event,data){
var s;
s=$('#grid_id').jqGrid('getGridParam','selarrow');
alert('selected rows:'+s);
});
the alert
dialog always displays null
. The grid is working fine.
The submit button is as:
<sj:submit value="Rows" onClickTopics="getrows" button="true"/>
when I checked in firebug, on clicking the submit button it pops 1 error
TypeError: c is undefined in file : struts2/jquery.struts2.min.js?s2j=3.5.1
What is this error and why it is not working?
<sjg:grid
gridModel="csvDetailList"
id="grid_id"
caption="Csv Files Pending"
dataType="json" href="%{remoteurl}"
multiselect="true" multiboxonly="true"
>
<sjg:gridColumn name="csv_filename" title="File" width="400"></sjg:gridColumn>
<sjg:gridColumn name="month" title="Month" width="100"></sjg:gridColumn>
<sjg:gridColumn name="year" title="Year" width="100"></sjg:gridColumn>
<sjg:gridColumn name="upload_status" title="Upload Status" width="150" ></sjg:gridColumn>
</sjg:grid>