Forum


23:16

31/05/2010

I am trying to create a new grid in response to the results from an AJAX call where the column layout of the grid is defined on the fly.
So far I have:
var grid = $("#results_grid");
grid.jqGrid({
datatype: 'local',
colNames: column_names,
colModel: column_model,
caption: "Query results",
altrows: true,
viewrecords: true
});
And then I add the data using:
grid.jqGrid('addRowData', idx, data);
The problem is that I get an exception in addRowData to the effect that 't.rows.length' is null ... which it is. After that the grid appears on the page with the columns defined, but no rows visible.
I've tried this in 3.6.4 and the 3.7 beta. Am I missing a step somewhere?
18:00

10/08/2009

You welcome!
I month ago I made the same error. I spend a lot of time in searching such error. Thus I could see in your question the solution immediately. By the way I placed a feature request which could reduce the time of searching of such kind of bugs /blog/?page_id=393/feature-request/more-control-of-requirements-and-generation-alerts/&value=1671&type=9&include=0&search=1&ret=all.
Best regards
Oleg
21:48

Moderators
30/10/2007

Hello Oleg,
We will try to make such checking.
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:
61 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