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