Forum
Topic RSS
Related Topics
21:59
30/12/2009
OfflineI am using a treegrid.
It seems like wrong onClickSubmit is being fired.
On loading the grid if i click on edit button and submit the onclicksubmit of the edit fires which is correct. but when i click on Add the correct Add screen appears but onclicksubmit of the edit fires!
If i reload the page and click on Add the onClickSubmit of the Add fires which is correct, next i try to edit Edity form appears and the onclickSubmit of the Add fires.. Please help!!
here is the code
http://pastie.org/private/ycfw.....bxdqgjyohq
Please help!
17:23
20/07/2011
OfflineHad the same problem, haven't looked at the jqGrid code yet, but did find a workaround.
In the code example that you gave, change the onclickSubmit() for both the edit and add options to point to the same function
var afterSubmitFunction = function (rp_ge, postdata) {
switch (postdata.oper) {
case "edit":
break;
case "add":
break;
case "del":
break;
}
}
var beforeSubmitFunction = function (rp_ge, postdata) {
var myGridID = "treegrid";
switch (true) {
case typeof postdata[myGridID+"_id"] == "undefined" : // Delete button
// Do delete stuffs
break;
case postdata[myGridID+"_id"] == "_empty" : //Add button
// Do Add stuffs
break;
default : // Edit Button
// Do edit Stuffs
break;
}
}
Most Users Ever Online: 994
Currently Online:
27 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
Log In
Home