Forum


I have a master detail setup. Works fine passing the id. But in addition to passing the ID, I want to pass another field from the master table row into the query for the detail grid.
Using the example provdedI thought this would work. But just using the alert test to see what is returned - the machinename changes every time, but the resolution does not change. Any ideas? (using 3.2)
I set up master table and then...
, onSelectRow: function(ids) {
var ret = jQuery("#masterGrid").getRowData(ids);
var machine= ret.machineName;
var resolution= ret.resolution;
alert(resolution+" "+machineName);
if(ids == null) {
ids=0;
if(jQuery("#detailGrid").getGridParam('records') >0 )
{
jQuery("#detailGrid").setGridParam({url:"get.php?resolution="+resolution+"&machine="+machine+"&q=5&id="+ids,page:1})
.setCaption("Performance Detail: "+ids)
.trigger('reloadGrid');
}
} else {
jQuery("#detailGrid").setGridParam({url:"get.php?resolution="+resolution+"&machine"+machine+"&q=5&id="+ids,page:1})
.setCaption("Performance Detail: "+ids)
.trigger('reloadGrid');
}
}
});
03:17

Moderators
30/10/2007

Hello,
check you code again. Maybe there are some typos here - By
example: you alert
alert(resolution+” “+machineName);
but actually this should be
alert(resolution+” “+machine);
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.
Sorry - No - that was my typo inthe post - sorry - I in fact do have
var ret = jQuery("#masterGrid").getRowData(ids);
var machineName= ret.machineName;
var resolution= ret.resolution;
alert(resolution+" "+machineName);
and both resolution and machineName - and its still not picking up the different resolutions. The machineName is fine - the resolution doesn't change. What am I doing wrong as I want to pass two parameters to the get detail url. Thanks.
02:33

Moderators
30/10/2007

Hello,
Also check your colModel - do you have column which
name is resolution?
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:
72 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