in my jqgrid i have field in a table which represents the id and i have set it as follows
{name:'e_info_id',index:'e_info_id', width:60, sorttype:"int",key: true}
and for json reader i have set it as
jsonReader : { repeatitems: false ,id: "e_info_id",root:"rows"}
Now when i click on the Add/Edit icon , an Edit dialog opens up , as i haven't set e_info_id as editable:true
that id field won't shown into the form dialog box, but when i click on submit i am not be able to access that id in a following function
onclickSubmit: function (options, postdata) {
postdata.e_info_id // is undefined
}
but as soon as i define e_info_id as editable=true , postdata.e_info_id has a value now. Now i see this a quite strange and i dont know how to get rid off this
{name:'e_info_id',index:'e_info_id', width:60, sorttype:"int",key: true,editable:true}
Moreover , to keep user from accidently update the e_info_id i tried to hide it as follow and keep the editable:true just to get the value of e_info_id in $.jgrid.edit
.
beforeShowForm: function(form) { $('#tr_e_info_id', form).hide(); }
But the issue with this , when i double click the row of a table beforeShowForm doesnt get fire so the e_info_id field appears.
ondblClickRow: function(rowid) {
$(this).jqGrid('editGridRow',rowid);
}
now i am out of workarounds , so basically my problem is not to show the e_info_id field in a add/edit dialog box and yet get the value of e_info_id in onclickSubmit