Hi, i have the problem that i can't send any identifier for the edited content to the edit.php file. it sends automaticaly an id=1 parameter for the first row in the grid for example...but this is not the same value as in mysql table column "id". the correct id is shown in the grid..it says id 3 in the first row, but when i edit data and save it, the grid id is shown as 1. how can i send and correct identifier to the edit.php?
Thanks in advance for your help.
this is the js code for the grid, the php part is working, only wrong parameter get's passed to it from the grid.
jQuery("#statsgrid").jqGrid(
{
url:'modules/json.php?stats=true',
datatype: 'json',
mtype: 'POST',
colNames:['ID', 'Nickname','Country', 'IP', 'Notes'],
colModel:
[
{name:'id',index:'id', width:90},
{name:'nick',index:'nick', width:90},
{name:'country',index:'country', width:80},
{name:'ip',index:'ip', width:100},
{name:'note',index:'note', width:150, sortable:false, editable:true, editoptions:{size:10}}
],
pager: '#statspager',
rowNum:10,
rowList:[10,20,30,50,100],
sortname: 'nick',
sortorder: 'desc',
height: '100%',
viewrecords: true,
editurl: 'modules/edit.php',
caption: 'Statistics'
}).navGrid("#statspager",
{}, //options
{height:280,reloadAfterSubmit:false,url:'modules/edit.php'}, // edit options
{height:280,reloadAfterSubmit:false}, // add options
{reloadAfterSubmit:false}, // del options
{} // search options
);