Hello,
I have setup the grid really nice and everything seems to work.
Right now, when I run the script on a gridbox page (theme balbooa gridbox) using Regularlabs Sourcerer, everything looks as expected.
When I add a new section (with text) above the grid with gridbox page, still everything looks normal.
When I add a new section (with text) below the grid with gridbox page, I see my first 7 columns in grid and then they are reapeated. Therefore I am getting 14 columns in my grid, which makes no sense.
I have sent Login details via E-Mail.
Screenshot:
Looks like its reusing already filled columns array again.
I’ve not seen code but its usually $cols. Make sure you reset $cols array before use. e.g.
$cols = array();
….
Just saw your code, in that:
1) You need to reset $opts as well. e.g.
$opts = array(); $opts["caption"] = ""; 2) And in columns setting:
$grid->table = "app_upload"; // cook column $cols = array(); $col = array();
If you want to show 2 datagrids, you need to assign each grid unique grid-id in render function otherwise it will behave unexpected.
$out = $grid->render("update_sites");