jqGrid: Pass currently selected row parameters

jqGrid: Pass currently selected row parameters

Hi,

How do I pass the currently selected row values (Group, Key, Time, Position) to the editurl (in bold) as a parameter? I have the following code:

  1. $(document).ready(function() {
  2. refreshGroups();
  3. }
  4. function refreshGroups() {
  5.     $.ajax({
  6.         url: "ajax/refreshGroups",
  7.         dataType: "json",
  8.         success: populateGroups,
  9.         error: handleAjaxError
  10.     });
  11. }
  12. function populateGroups(jobs){
  13. $(function () {
  14.     var grid = $("#list");
  15.                 grid.jqGrid({
  16.                     datatype: "jsonstring",
  17.                     editurl : "ajax/editSelect?Group=",
  18.                     datastr: jobs,
  19.                     colNames: ["Group", "Key", "Time", "Position", "Enabled"," "],
  20.                     colModel: [
  21.                         {name: 'tradingBook', index: 'tradingBook', width: 480, sorttype: 'string'},
  22.                         {name: 'id', index: 'id', width: 100, sorttype: 'int'},
  23.                         {name: 'startTime', index: 'startTime', width: 150, formatter: 'time', sorttype: 'int',editable:true},
  24.                         {name: 'queue', index: 'queue', width: 90, formatter: 'int', sorttype: 'number', align: 'center',editable:true},
  25.                         {name: 'enbl', index: 'enbl', width: 60, align: 'center',editable:true,edittype:'checkbox',formatter: 'checkbox', editoptions: {value: '1:0'},formatoptions: {disabled: false}},
  26.                         {name: 'myac', width:60, fixed:true, sortable:false, resize:false, formatter:'actions',formatoptions:{keys:true}}
  27.                     ],
  28.                     height: 'auto',
  29.                     width: 'auto',
  30.                     gridview: true,
  31.                     sortable: true,
  32.                     treeGrid: true,
  33.                     treeGridModel: 'adjacency',
  34.                     treedatatype: "GET",
  35.                     ExpandColClick: true,
  36.                     cellEdit: true,
  37.                     jsonReader: {
  38.                         repeatitems: false,
  39.                         root: function (obj) { return obj; },
  40.                         page: function () { return 1; },
  41.                         total: function () { return 1; },
  42.                         records: function (obj) { return obj.length; }
  43.                     }
  44.                 });

  45. });
  46. }
Note that "ajax/refreshGroups" is a method which retrieves data from a database which is passed into a map and saved in 'jobs'.

I have been stuck with this for days now. I have posted a similar question before with different code, but now I have decided to revert to this code - it might be easier to solve.

Thanks in advance!