I need some help with jqGrid. I have a table with the primary key column named ‘id’. It seems that there is naming conflict with jqGrid when the inline edit does ajax post back to save data. The rowid used as the unique identifier is also named ‘id’ in jqGrid.
Is it possible to change the default rowid variable name to something else, such as ‘_id’ to avoid naming conflict? Did I miss something?
There are different ways to solve your problem.
You can not change the id name used in jqGrid, but you can rename any parameters of ajax requests. For example you can use
prmNames: {id:"_id"}option of jqGrid.If you have a column in the table which has primary key and which can be used to identify a grid row, you can set
key: truein the column definition. As a result the column withkey: truewill be used by jqGrid instead of additionalid. Moreover this option can be used also to reduce the size of data (see Jqgrid 3.7 does not show rows in internet explorer as an example).