Forum


12:47

06/07/2009

I've seen the example to build a jqGrid table using local data when the array data is hard coded in the same .js file as the grid definition, but how do I use this method when I have a dynamically built PHP result array? Is there an example showing how to display this array data without encoding it in json or xml (i.e. using datatype: 'local')?
16:28

06/07/2009

Let me elaborate on my issue above; when I'm using a jqGrid with a datatype of local, I'm wondering how to pass a php array to the javascript function that's going to addRowData to my grid.
I've thought about converting the php array to a delimited string, passing that string to the JS function, then having my JS function convert it to a javascript array, then process the rows. Does this sound feasible? I'm going to try it and I'll report back either way.
Also, if I wanted to use a json datatype in my grid, is their a way to define the json source as local, instead of posting it to a URL?
05:54

Moderators
30/10/2007

Hello,
What about using the build in json_encode and json_decode - also refer to php 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:
48 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