Forum



16:44

07/12/2011

Hi,
I am not using a REST sever, but a channel based streaming server.... (cometd with extensions)
I would like to be able to use EditRow and get the call to the sever to be a function that I write.
function cometd_data(postdata){
sdata=get_data(postsdata);
grid[0].addJSONData(sdata);
grid.jqGrid('setGridParam',{datatype:'local'});
};
function my_proxy(s.t){
alert("my_proxy: is here");
};
function s_func(p){
alert("edit: success function here");
return true;
};
grid.jqGrid({
datatype: cometd_data,
dataProxy: my_proxy,
useDataProxy: true,
mtype: 'GET',
colNames:colNames,
.
.
.
editurl: null,
onSelectRow: function(id) {
if (id && id !== lastsel) {
grid.jqGrid('restoreRow',lastsel);
lastsel = id;
}
grid.jqGrid('editRow', id, true,null,s_func);
}
}
So I have tried using the dataProxy- but the function my_proxy never gets called, nor does s_func, I get a 404 with a null page as it tries to use a non existant edit url. The dataype function works fine. What am I doing wrong?
( I have got the edits working by setting the edit url in the editRow function to 'clientArray' saving locally and the using the afterSave function to actually send the data to the server but I think this is rather messy and difficult to restore the original row data if the edit on the server fails)
thanks
B
Most Users Ever Online: 715
Currently Online:
52 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