JQGRID Master detail on different pages
Posted
by
dennisg
on Stack Overflow
See other posts from Stack Overflow
or by dennisg
Published on 2010-12-28T14:51:13Z
Indexed on
2010/12/28
14:54 UTC
Read the original article
Hit count: 416
Hello,
I need some help on next things.
I was trying to do next few things.
I have one grid_test.php (that creates jqgrid) and index_grid.php (just to display grid.php). jQGrid in grid.php have custom button named 'Prikazi'.
I want the user to select one row from that grid and when press custom button 'Prikazi' to redirect to another page to show subgrid (and to pass parameter which is the id of the selected row).
Subgrid is in the file detail_test.php and also I have file called index_detail.php (for displaying the file detail_test.php with jqgrid).
These php files communicate by passing parameter id_reda (or id) that is id of the selected row in grid_test.php.
I have tried many ways to achieve that but I wasn't able. Subgrid php file (detail_test.php) receives that parameter but when I add that to sql statement in subgrid file it shows next error: Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LIMIT 0, 0' at line 16' in C:\Zend\Apache2\htdocs\jqSuitePHP3811SourceRadna\php\jqGridPdo.php:62
I really don't know what am I doing wrong.
Maybe the passing of parameter is wrong and maybe subgrid can't create colModel properly. Or it has something to do with sql statements.
Actually my work was based on one of your examples masterdetail, but I wanted to have master grid on one page and when user clicks custom button, goes to another page with detail grid.
You can see my example on next page: http://pljevlja.org/grid/index_test.php. And all my php files are here: ->http://pljevlja.org/grid/TXT.zip<-
Thanks in advance,
© Stack Overflow or respective owner