Nested grid


Can you show me an example of nested grid, with server-side?

I found this example with xml:

and this working example: … grids.html

But I need an example with php. For the simple grid, in php, I have:

$grid = new GridConnector($connection,“MySQL”);
$sql = “SELECT *
FROM table
WHERE active=1”;

From what I saw in the xml file of the working example ( … /sgrid.xml) I need the first cell to have type=“sub_row_ajax” and in that sell to have “/path/to/sub-table.php”

How can I do this?

You may try to use the onSubgridCreated event to customize the init/load process of your sub grid.
Here you can find a tutorial: … ustomizing

I look at the example from here:

I included:

But I get the error in console:

Uncaught ReferenceError: gD is not defined (dhtmlxgrid_excell_sub_row.js:10)/

Do I have to include other files? I also have the

file included.

If you have dhtmlx.js on the page you need not other js files, as it includes all extension.
Also, if you will use separate js files, be sure that order of includes is

  • dhtmlxcommon.js
  • dhtmlxgrid.js
  • dhtmlxgridcell.js
  • any other grid’s extensions

Can you please take a look of the file I have dhtmlxgrid_excell_sub_row.js ?

Why it’s throwing that error: Uncaught ReferenceError: gD is not defined ? (2.48 KB)

It seems that this is the code from one of online samples, which is obfuscated and purposed for usage in online samples only.

You need to use the same file from the downloadable package. ( files from online samples are not compatible with not-obfuscated packages )

I understand now. Thank you for your answer