DhtmlxLayout + Grid when using MySQL

I’ve been trying for the last 2 days to get sql data to display on a Grid within a Layout.
Same data displays fine on a regular Grid, but when used within a Layout it shows some rows only.
If for the same Grid inside Layout I use an XML file it works fine.
Is this a known bug?
I’ll attach a screen shot of my problem.

No ideas? :unamused:

We need the code with layout and grid initialization to recreate the problem