Note that there are some explanatory texts on larger screens.

plurals
  1. POSending additional parameters to editurl on JQgrid
    primarykey
    data
    text
    <p>My problem now is trying to send the ID (<code>editable: false</code>) of a row when editing that row. </p> <p>For example, i have a grid with columns userid(<code>editable: false</code>), username(<code>editable: true</code>), firstname(<code>editable: true</code>), lastname(<code>editable: true</code>). When editing the row the grid is only sending the parameters username, firstname and lastname. In the server side i need the userid to know to which user i've tu apply those new values.</p> <p>the editUrl looks like:</p> <pre><code>editurl : CONTEXT_PATH+'/ajax/admin/savePart.do?category=1', </code></pre> <p>Thanks</p> <p>This is the full code:</p> <pre><code>$.jgrid.useJSON = true; //http://www.trirand.com/jqgridwiki/doku.php?id=wiki%3Acommon_rules $(document).ready(function() { //alert(CONTEXT_PATH); var lastsel; jQuery("#rowed3").jqGrid( { url : CONTEXT_PATH+'/ajax/getPartesByCategory.do?catid=&lt;s:property value="categoryId" /&gt;', //url : '/autoWEB/text.html', datatype: "json", ajaxGridOptions: { contentType: "application/json" }, jsonReader : { root: "rows", page: "page", total: "total", records: "records", repeatitems: false }, headertitles: true, colNames : [ 'ID', 'Pieza', 'Disponible'], colModel : [ { name : 'piezaId', index : 'piezaId', align : "right", width : 50, editable : false, required : true }, { name : 'descripcion', index : 'descripcion', width : 390, editable : true, required : true }, { name : 'disponible', index : 'disponible', width : 80, editable : true, edittype : 'select', editoptions:{value:"0:No;1:Si"}, required : true } ], rowNum : 20, rowList : [ 20, 40, 60, 80 ], pager : '#prowed3', sortname : 'piezaId', postData: {piezaId : lastsel}, mtype:"POST", viewrecords : true, sortorder : "desc", onSelectRow : function(id) { if (id &amp;&amp; id !== lastsel) { jQuery('#rowed3').jqGrid('restoreRow', lastsel); jQuery('#rowed3').jqGrid('editRow', id, true); lastsel = id; } }, editurl : CONTEXT_PATH+'/ajax/admin/savePieza.do?categoria=&lt;s:property value="categoryId" /&gt;', caption : "Piezas" }); jQuery("#rowed3").jqGrid('navGrid', "#prowed3", { edit : false, add : false, del : false }); }) </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload