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
getRowData passing from master to detail
08/09/2008
12:37
Avatar
bouton
Member
Members
Forum Posts: 12
Member Since:
30/11/2007
sp_UserOfflineSmall Offline

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');
          }
        }
        });

09/09/2008
03:17
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

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.

11/09/2008
06:52
Avatar
bouton
Member
Members
Forum Posts: 12
Member Since:
30/11/2007
sp_UserOfflineSmall Offline

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.

12/09/2008
02:33
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

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.

12/09/2008
05:38
Avatar
bouton
Member
Members
Forum Posts: 12
Member Since:
30/11/2007
sp_UserOfflineSmall Offline

As always - user's fault - 😉

I was passing a non-unique ID. When you suggested the colModel - that got me thinking - hey maybe the query is wrong. Thanks.!

Solved.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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