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
eval()`ed subgrid fails
23/09/2008
10:11
Avatar
sledge
Member
Members
Forum Posts: 28
Member Since:
07/04/2008
sp_UserOfflineSmall Offline

Hello,

I am creating grid and its subgrid dynamically, by posting ajax request and doing eval(response); (i do this because a schema of a subgrid depends on which row i have clicked).

With main grid everything works fine. After I expand row, subgrid gets created OK (eval from JSP generated action), too, but writes out Loading and stays like that.

It should add a row of data, which does get fetched (firebug reports correct response of the json row I need to see in a subgrid).

However, firebug shows an error:

ts.rows is undefined
addJSONData()grid.base-min.js (line 87)
complete()grid.base-min.js (line 99)
complete()jquery.js (line 11)
e()jquery.js (line 11)
[Image Can Not Be Found]$(ts.rows[i]).after(row);if(afterInsRow){ts.p.afterInsertRow(row.id,rd);}
I have viewed all code which is being eval()`ed -- it is ok (i.e., it is the same action in JSF that is rsponsible to create grid and its subgrids, it manages changing of the grid_id via parameters, so I have checked -- all jQuery('#<grid_or_subgrid_id>'). .. references are OK.
I do not know where to look for more...
Please help, thanks huge,
--
sledge

23/09/2008
15:36
Avatar
sledge
Member
Members
Forum Posts: 28
Member Since:
07/04/2008
sp_UserOfflineSmall Offline

To add more information in the matter, which is a major blocker for me..:

I have tried even swapping grid with its subgrid – same results (Loading forever).

It would appear that it breaks on the bigger JSON data being somehow invalid. But it consists only from 10 elementary not-corrupted strings (for 10 columns) -- that's for the subgrid. (remember -- the same code generates the json from the DB query). Main grid contains 3 columns only.

If I replace subgrid with hardcoded xmlstring, everything shows ok. jsonstring meanwhile cannot be shown.

Is there a problem with many-columned json strings?

Probably -- no, because the biggest mistery in this was that JSON data with 10 values was displayed OK, when the subgrid was still hardcoded in the .html file. Once I have refactoried it to be eval()`ed, it stopped showing data.

Well, I hope I'll break through this one..

Standing by, pals,

--
sledge

24/09/2008
04:57
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

The simple test is:

Do not use jqGrid. Simulate ajax request for the problem data and see

what it is. If all is ok - look in the jsonReader and look if

you return the correct data.

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.

24/09/2008
11:14
Avatar
sledge
Member
Members
Forum Posts: 28
Member Since:
07/04/2008
sp_UserOfflineSmall Offline

Thank you. With clear head today I have solved the problem: it was an erroneous backreference to the ever generated subgrid id.

case closed, pardon for that

--
sledge

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
46 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