Forum


02:03

07/01/2011

I love jqGrid so far, but I am totally stuck. I can't figure out how to edit data from multiple tables. I have gone over every line of every tutorial, and I'm starting to think that it's just not possible.
- I have downloaded and installed the application from here: jqGrid for PHP 3.8.2.1 http://www.trirand.net/download.aspx
- I have read through and tried both of these methods: Master Detail On Select and Sub Grid (2 nested levels). I am using these guides: http://www.trirand.net/demophp.aspx and http://www.trirand.net/documen...../index.htm
This is the problem: I can't seem to get anything to work, because in the first table ("users"), I have a primary key "uid", but in the second table that I also need to be able to edit, "profiles", I do not have that same primary key. So I have to do a complex SQL select command that uses a third table as an intermediary (the "node" table):
However, if I set up editing in jqGrid, it only can post the updates to the "users" table, since that is the table is chosen for editing in grid.php ($grid->table = 'users';) and that table has the primary key (uid). Any other changes are NOT saved to the database.
Currently, I have a Master/Detail layout set up, with the Master grid displaying data from the "users" table, and the Detail grid displaying data from the "profiles" table. However, this ALSO has to rely on a complex SELECT command in "detail.php", and it doesn't work - the detail table is blank unless I remove the last AND statement, in which case it displays all records, not the one that I select in the Master table.
Am I going about this all wrong? Can I edit two tables from the same grid? If not, can I do it with a SubGrid or a Master/Detail setup? Am I required to have the same primary key in both tables to do anything at all?
Please help, I will have to abandon this project and jqGrid in general if no one has any ideas on how to do this. (You would think this would be easy.)
18:16

07/01/2011

There are a lot of threads in the help forum with no replies...
Is anyone supporting jqGrid? Is the author/team still around?
I'm not going to pay $300 for something that can't edit data from more than one table and has no support whatsoever... has anyone been able to get this to work? How did you do it?
19:05

Moderators
30/10/2007

Hello,
You are in the wrong forum.
Please post your problem here:
This place is for the open source Java Script only jqGrid, while you try the commetial jqGrid PHP component.
Best 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:
76 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