Forum
17:27
23/08/2013
Hi everyone!
I have a little problem:
I have a grid which works perfectly, except for one thing: after an edit, I need to format new datas in JSON to send them to the server.
And I cannot find how to do that.
Does someone have an idea?
P.S: I'm not english, please forgive my mistakes.
EDIT: Here is the grid:
$("#list").jqGrid({
url:'datas.php',
datatype: "json",
mtype: "GET",
colNames: ["ID","Client", "Projet", "Tache", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31"],
colModel: [
{ name: "id_record", width: 55, hidden:false},
{ name: "client", width: 55, sortable:true},
{ name: "projet", width: 150, align: "right", sortable:true},
{ name: "tache", width: 150, align: "right", sortable:true, editable:true}
],
height: '100%',
cellEdit: true,
cellurl: "https://ort8m12c8ckf.runscope.net",
pager: "#pager",
rowNum: 10,
rowList: [10, 20, 30],
sortname: "id_record",
sortorder: "asc",
viewrecords: true,
gridview: true,
autoencode: true,
caption: "My Grid",
gridview: true,
beforeSubmitCell : function(rowid,celname,value,iRow,iCol) {
selectedRowId = $('#list').jqGrid ('getGridParam', 'selrow');
cellValue = $('#list').jqGrid('getCell', selectedRowId, 'id_record');
return {valeur:value,nom_cellule:celname,id_record:cellValue};
}
});
Most Users Ever Online: 715
Currently Online:
33 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66