Forum


22:04

22/08/2011

I have a large amount of data (~1000 rows) that I need to display in a jqGrid. Most of the data I have upfront so I create the grid and the data through the 'data' parameter. However, a couple of the columns require a query to a remote server that needs to be handled separately. It is complicated and slow, so I want to write the code to update this column only for the rows that are displayed.
I can set the column values using setCell(), but I need some sort of notification when new rows are displayed. Is there a way to handle this to update the row values as needed?
My initial grid is as follows:
jQuery(#table).jqGrid({{
autowidth: true,
data: data,
datatype: local
height: 400,
colNames: ['Date', 'report', 'attachment'],
colModel: [
{name: 'studyDate', index: "studyDate" },
{name: report, index: "report" },
//the attachment value should be paged in as necessary as it requires an async call
{name: 'attachment', index: "attachment" },
],
rowNum: 25,
scroll: 1
});
If I do need to update a row, I can just do the following (after querying for the value):
jQuery(#table).jqGrid('setCell', rowId, 'attachment', value);
Any suggestions? This is a real killer for me right now.
Stu
Most Users Ever Online: 715
Currently Online:
52 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