master-detail.php

Questionsmaster-detail.php
Chao Shun Jenq asked 6 years ago

Hello,

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?

Rgds,

1 Answers
Abu Ghufran answered 6 years ago

Hello,

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.

e.g.

// 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 + 1 =

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 / 5. Vote count:

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

Let us improve this post!