title: Passing extra parameters in JQGrid delete with multiselect
body: <p>I want to have delete functionality in my JQGrid for deleting multiple rows. My code looks like this:</p>
  
  <pre><code>    {height:180,mtype:"POST",closeAfterDel:true, url:'gridedit.jsp',reloadAfterSubmit:true,
  
   onclickSubmit: function (options, rowid) {
        var rowData = jQuery(this).jqGrid('getRowData', rowid);
        var params ={amount:rowData.amount,account:rowData.account.replace(/-/g,"")};
  
        return params;
  
     },
  
     afterSubmit: function () {
      $(this).jqGrid('setGridParam', {datatype:'json'});
      return [true,'']; 
  }
  </code></pre>
  
  <p>}</p>
  
  <p>I want to make deletions as per the values of the column <strong>rowData.account</strong></p>
  
  <p>The problem is that when I select multiple rows, I can see that the grid passes all the rowid's back to the edit URL, but only passes the rowData.account value of the first row !</p>
  
  <p>Is there a way to make the grid pass back all the values? I cant delete based on the row id on the back end as my database does not have any row id's.</p>
  
  <p>Please help.</p>
  
  <p>Here is my grid code:</p>
  
  <pre><code>    jQuery(document).ready(function(){ 
  
    jQuery("#list").jqGrid({
  
    datatype: 'json',
    url:'gridfeeder.jsp?ctlSelectedDate=&lt;%= request.getParameter("ctlSelectedDate")%&gt;',
  
    colNames: ['Date', 'Account ', 'Amount', 'Code'],
    colModel: [
  
               //First Column, DATE
  
    {name: 'adate', index: 'adate', width: 300, sorttype: 'date', align: 'center',datefmt: 'Y-m-d',
   editable:true, formatter: myLinkFormatter, editoptions:{
  
       dataInit:function(elem)
        {
       jQuery(elem).datepicker({
  
           showButtonPanel: true,
           changeMonth: true,
            changeYear: true
  
       });
  }}, search:true, stype:'text',searchoptions:{
  
       dataInit:function(elem)
        {
       jQuery(elem).datepicker({
  
           showButtonPanel: true,
           changeMonth: true,
            changeYear: true
  
       });
  }
  
   }
  
    },
              //Second Column, ACCOUNT
  
              { name: 'account', index: 'account', width: 300, align: 'center', sorttype: 'string', editable:true,
      search:true, stype:'text',editrules:{custom:true, custom_func:
  
          //Validation for this column for editing
  
          function(value, colname) {
          if (value.length&lt;9 || value.length&gt;11) 
                 return [false,"Invalid Input"];
              else 
                 return [true,""];
              }
      },
      searchrules:{custom:true, custom_func:
  </code></pre>
  
  <p>//Validation for this column for searching</p>
  
  <pre><code>        function(val, colname) {
          if (val.length&lt;9 || val.length&gt;11) 
                 return [false,"Invalid Input"];
              else 
                 return [true,""];
              }
      }
    },
  
              //Third Column, AMOUNT
  
    { name: 'amount', index: 'amount', width: 300, align: 'center', sorttype: 'float', editable:true,
      editrules:{number:true}, search:true, stype:'text'
    },
  
              //Fourth Column, CODE
  
    { name: 'code', index: 'code', width: 300, align: 'center', sorttype: 'float', editable:true,
      search:true, stype:'text'
    }
  
    ],
  
    pager: "#pager",      //Identifying the navigation bar
    rowNum: 500,          // how many rows to display on page 1
    rowList: [500,1000, 2000, 3000,4000], //values for the dropdown which specifies how many rows to show 
    sortorder: "desc", //the order of sorting by default
    viewrecords: true, // displays total number of rows
    gridview: true,
    autoencode: true,
    height:400, //height of the grid
    ignoreCase:true,// case insensitive search
    multiselect:true, // checkboxes before each row
    multiboxonly: true,
    loadonce:true, //for client side sorting, searching and pagination
    caption:"This is me" // caption for the grid header
  </code></pre>
  
  <p>here is the navgrid section :</p>
  
  <pre><code>    }).navGrid('#pager',{edit:true,add:true,del:true,search:true,refresh:true},
  
  // Options for EDIT 
  
      {height:280,mtype: "POST",closeAfterEdit: true,reloadAfterSubmit:true, url:'gridedit.jsp',
  
          recreateForm: true, 
  
          //set some properties beofre the dialog box is seen by the user
  
          beforeShowForm: function(form) {
  
              /*$('#adate',form).attr('readonly','readonly');
              $('#account',form).attr('readonly','readonly');*/
  
              $('#adate',form).hide();
              $('#account',form).hide();
          },
  
          // what happens when the user clicks submit. passing extra parameters
  
             onclickSubmit: function (options, postdata) {
  
                 var rowid = postdata[this.id + "_id"]; // postdata.list_id
  
                 var dataF = jQuery('#list').jqGrid ('getCell', rowid, 'account');
  
              return {account:dataF.replace(/-/g,"")};
              },
  
             // changing the datatype
  
           afterSubmit: function () {
              $(this).jqGrid("setGridParam", {datatype: 'json'});
              return [true,''];
          }
  
      },
  
      //ADD options
  
      {height:280,mtype:"POST", closeAfterAdd:true, reloadAfterSubmit:true, url:'gridedit.jsp',
  
  
  beforeShowForm: function(form) {
  
      /*var cm = jQuery("#list").jqGrid('getColProp','adate');
      alert(cm);
      cm.editable = false;
      $('#adate',form).attr('readonly','readonly');
      $('#account',form).attr('readonly','readonly');*/
      $('#adate',form).show();
      $('#account',form).show();
  },
  
      //Change the datatype
  
  afterSubmit: function () {
      $(this).jqGrid("setGridParam", {datatype: 'json'});
      return [true, ""];
  }
      },
  
      {height:180,mtype:"POST",closeAfterDel:true, url:'gridedit.jsp',reloadAfterSubmit:true,
  
  /* onclickSubmit: function (options, rowid) {
        var rowData = jQuery(this).jqGrid('getRowData', rowid);
        var params ={account:rowData.account.replace(/-/g,"")};
  
        return params;
  
     },*/
  
     delData: {
         account: function() {
                    var sel_id = $("#list").jqGrid('getGridParam', 'selrow');
                    var value = $("#list").jqGrid('getCell', sel_id, 'account');
                    return value.replace(/-/g,"");
               }
        },
     afterSubmit: function () {
      $(this).jqGrid('setGridParam', {datatype:'json'});
      return [true,'']; 
  }
  
      }
  
      );
  
    function myLinkFormatter(cellvalue, options, rowObject) {
  
        return "&lt;a href='account094act.jsp?GETDATE=" + cellvalue + "&amp;GETACC=" + rowObject[1] + "'&gt;" + cellvalue + "&lt;/a&gt;";
    }
  
    jQuery("#refresh_list").click(function(){
          jQuery("#list").setGridParam({datatype: 'json'});
          jQuery("#list").trigger("reloadGrid");
      });
  
      });  
  </code></pre>