Forum


00:42

08/11/2008

Hi,
I am binding the Grid to an array and wanted to save the changed values of a row (After Edit) back to the array instead of posting it to another page.
I haven't seen any examples in the Demo pages doing this. All the examples want to post to another page. Does anyone have any idea how I could do this? The Row needs to go in the Edit mode when the user clicks the row and I need to save the capture the new values back to the grid (& underlying Array).
Thank you.
12:59

Moderators
30/10/2007

Hello,
Never mind that this can be used. If you can - set the url to one dummy
existing file on server and them perform the needed operations.
beforeSubmit and afterSubmit events have a parameter a array of the
posted data which can be used.
Regards
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
20:16

08/11/2008

Thank you for the feedback.
I can't get those 2 events to fire. I tried many variations. Here's the sample I tried for the beforeSubmit event:
jQuery("#grd").jqGrid({ datatype: "local", width: 185, height: 165, colNames:
['Position', 'Start', 'Filled'],
colModel: [
{ name: 'Pos', index: 'Pos', width: 45, align: "center", sorttype: "string" },
{ name: 'St', index: 'St', width: 36, align: "center", sorttype: "int", editable: true },
{ name: 'Max', index: 'Max', width: 36, align: "center", sorttype: "int", editable: true}], imgpath: gridimgpath,
multiselect: false, shrinkToFit: false, onSelectRow: function(id) {
if (id && id !== lastsel2) {
jQuery('#grd').restoreRow(lastsel2);
jQuery('#grd').editRow(id, true, oneditme, saveme);
lastsel2 = id;
}
}, beforeSubmit: function(id) { alert('about to submit'); }, afterSubmit: befSubmit, editurl: "test.aspx", caption: "Roster Needs"
});
Any idea what the problem is?
06:46

Moderators
30/10/2007

Hello,
You have mix formedit with inline edit. Also refer to docs.
Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
Most Users Ever Online: 715
Currently Online:
63 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