Forum
21:06
19/05/2009
When submitting a record to the server, the serializeEditData function is called properly and "this" contains the gbox variable containing the value "#gbox_theIdofthegrid". After editing another record (the form edit is reopened) and the submit button is pressed, the serializeEditData function is called properly BUT "this" doesn't contain the gbox variable.
Why so important? It is the ONLY way I've found,to this date, to know which grid i'm working with. When data is submitted to the server, I absolutely need to know from which grid/table.
I strongly believe, if there are no other way to know the grid id, that the grid itself should be passed to every event custom function. If not possible, at least the id should be provided so the grid could be called.
If no fix possible, can anybody provide a solution to get to the jgrid?
Thanks!
22:52
30/07/2009
Looks like if you set "recreateForm:true" in the editGridRow options, you'll always get access to this.gbox.
Also, you can always give your serialize function the name of the grid (or even the grid object) via a closure:
myGrid.jqGrid("navGrid", ..., { ...
serializeEditData : (function(grid) { return function(postdata) {
// do something with postdata and grid
} })(myGrid),
...} ...);
Yes, its an ugly hack
Mark
Most Users Ever Online: 715
Currently Online:
71 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