Chao Shun Jenq asked 10 years ago


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?


1 Answers
Abu Ghufran answered 10 years ago


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.

Your Answer

10 + 8 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.

How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?