Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
gbox variable not set when reopening a formedit
19/11/2009
21:06
Avatar
Basdub
Member
Members
Forum Posts: 24
Member Since:
19/05/2009
sp_UserOfflineSmall Offline

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!

19/11/2009
22:52
Avatar
markw65
Member
Members
Forum Posts: 179
Member Since:
30/07/2009
sp_UserOfflineSmall Offline

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 Frown

Mark

19/11/2009
23:31
Avatar
Basdub
Member
Members
Forum Posts: 24
Member Since:
19/05/2009
sp_UserOfflineSmall Offline

Thanks Mark will try the recreate form. Got it set but not on the edit parameter of the edit button (pencil);

Otherwise, I don't know if i could set that parameter in my php jGrid class. Will give it a shot!

19/11/2009
23:38
Avatar
Basdub
Member
Members
Forum Posts: 24
Member Since:
19/05/2009
sp_UserOfflineSmall Offline

First option seems to work.

I'll check the other tomorrow. Thanks again!

Forum Timezone: Europe/Sofia

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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information