Which version of jqgrid are you using? I have code very similar to
yours and it has been working with jqgrid 3.4.
I am looking at version 3.6 and current version 3.7.1 and found that
the json format returned from TG2 needs to change as indicated in the
following from the web site.;
Upgrade from 3.6.4 to 3.6.5
You should read this upgrade notes when you use JSON response from the
server.
These notes are valid when you upgrade from any other version of
jqGrid.
With version 3.6.5 we switch from ajax complete to ajax success
event.
With this switch we directly use the jQuery parsing of JSON data. As
of version 1.4.x of jQuery this parsing is strict. More information
can be found here
This will reflect in certain systems not to display the data.
What you need to know if the data is not displayed when you upgrade
from 3.6.4 to 3.6.5 version
Valid JSON response
Your json response should be correct json formatted string. This mean
that if your response look like this:
{
total: "xxx",
page: "yyy",
records: "zzz",
rows : [
{id:"1", cell:["cell11", "cell12", "cell13"]},
{id:"2", cell:["cell21", "cell22", "cell23"]},
...
]
}
This will not work.
In order to display the data in the grid, you should properly define
the json response - i.e
{
"total": "xxx",
"page": "yyy",
"records": "zzz",
"rows" : [
{"id" :"1", "cell":["cell11", "cell12", "cell13"]},
{"id" :"2", "cell":["cell21", "cell22", "cell23"]},
...
]
}
As can be seen every property should be quoted.
There are other changes as well and some needed to the HTML code for
the grid.
On Jun 16, 3:43 pm, Timuçin Kızılay <[email protected]> wrote:
> I'm using jquery 1.4.2 and using
--
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en.