I want to add a couple of columns to the edit dialog that are read-only in order to show users which row of data they are editing. The selected row only gets highlighted very faintly so it's hard for users to tell which row of data they are editing. Is there a way to add columns to the edit modal and make them read-only?
Here's what I've tried but none of them work. Maybe there is some Javascript-ism that I don't have quite right, but I can't figure it out.
Has anyone been able to add columns to the edit modal that are read-only?
$("#prodTable").jqGrid('navGrid', '#pager',
{ edit: true, add: false, del: false, search: false, refresh:true },
{ // edit
beforeInitData : function(formid) {
console.log("beforeInitData formid: " + formid);
//$("#" + "serialNumber").prop('readonly',true);
//$("#prodTable_serialNumber").prop('readonly',true);
//$("#prodTable_serialNumber").attr('readonly',true);
//$("#jqgh_prodTable_serialNumber").attr('readonly',true);
//$("#jqgh_prodTable_serialNumber").prop('readonly',true);
$("#formid").prop('readonly',true);
}
}