Forum
11:55
29/03/2012
Hi, first thanks for a great grid. I have found a potentially critical bug when using the InlineNav editing feature.
The problem I'm seeing is that once you add a new record using the inline editing feature from the nav grid the "oper" parameter in the POST data is always set to "add" even after the record has been added and subsequently then "edit" different records. Its like it gets permanently set to "add"
I can see this behaviour using the inline nav editing demo and looking at the Post data in Firebug.
Reproduction case:
Navigate to:
http://www.trirand.com/blog/jq..... ( then select Row Editing (new) from NAV list, then InLineNavigator (new).
Open up firebug and monitor the POST data.
Add a new row and save - "oper" is "add" (correct)
Edit a different row and save - "oper" is "add" (incorrect should be "edit")
It also doesn't help if I reload the grid midway.
It would be great if to confirm wether this is a bug or if I've misunderstood something.
23:30
29/03/2012
Sorry typo should have read InlineNav...
I'm not very good following javascript but I believe the issue is in the way the add new record code reuses the edit code to do the bulk of the work. The add code seems to use the extraparams feature to set the oper to add. Then calls the edit functionality. Theres some data overriding which overrides the edit oper with add. This extra param seems to hang around and nevers gets reset so when the edit code gets called normally again the override is still in place.
I'm not 100% sure where the code should be fixed for now I've just changed the following which seems to be working OK:
Line 9212:
if
oper = opers.oper;
o.editParams.extraparam = {};
}
o.editParams.extraparam[oper] = opers.addoper;
}
($("#"+$.jgrid.jqID(sr), "#"+$.jgrid.jqID($t.p.id) ).hasClass("jqgrid-new-row")) {var opers = $t.p.prmNames,if(!o.editParams.extraparam) {
else
{
// new code here
o.editParams.extraparam = {};
}
I'm not suggesting this as a fix because it will probably break actual valid use of the extra param feature but I'm not using that feature so it works for me. Hopefully a proper fix can be easily added to the next version.
13:14
Moderators
30/10/2007
Hello,
First of all - thank you.
If I remember I think this is fixed. I will check it again.
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:
42 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