in the demo program "master-detail.php",
when we open this form, it will display the master and detail grids on the screen.
but detail grid is display all of data ( no relative to master).
how to do when we open the new form then detail can be relative to master?
Detail grid shows relative data when we select some record in master.
You can however display blank (at start) by specifying some false where condition.
// and use in sql for filteration
$grid->select_command = "SELECT id,client_id,invdate,amount,tax,total,'$company' as 'company' FROM invheader WHERE client_id = $cid";
Here $cid is passed when master is selected. You can set
if (empty($cid)) $cid = -1;
It will result in no records for initial display of detail grid.
How useful was this discussion?
Click on a star to rate it!
Average rating / 5. Vote count:
We are sorry that this post was not useful for you!
Let us improve this post!
Thanks for your feedback!