Forum


06:19

20/04/2010

I have two jqGrid's and when the first row is changed I would like to refresh the second grid. I am currently trying to accomplish this by sticking the trigger("reloadGrid") of the child grid into the onSelectRow function of the parent. It is not firing every time and I have confirmed this with Firebug. Any recommendations? I know there is the ability to do subgrids, but I would prefer not to unless there is no other way.
Thanks in advance!
00:21

20/04/2010

Ok I think I found a good solution… plus it is probably better not to fire the Ajax if the user is quickly changing rows anyways.
var vAttendanceRefreshGrid;
..
clearTimeout(vAttendanceRefreshGrid);
vAttendanceRefreshGrid = setTimeout(function(){vAttendance.trigger("reloadGrid",[{page:1}]);},500);
I actually wrote some keypress events as well so the user can scroll through
the grid with up arrow/down arrow/page up/page dn/home/end... so if they
are really hammering on the keyboard it is probably better I don't fire off n number
of ajax requests when they aren't going to see the data for the rows they are
scrolling through really quickly anyways.
Most Users Ever Online: 715
Currently Online:
144 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