columns are rendered twice with theme balbooa gridbox

Questionscolumns are rendered twice with theme balbooa gridbox
Speedclinic asked 4 years ago

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:

2 Answers
Abu Ghufran Staff answered 4 years ago

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();
….

_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Abu Ghufran Staff answered 4 years ago

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");

 

_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Your Answer

4 + 16 =

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?