Grid height not working as expected

QuestionsGrid height not working as expected
Tasagore Seibei asked 1 year ago

Hi

I’ve inserted the grid in a webpage with header and footer. The grid height should be 100% of the <body> section but I can get it. In fact it works in a strange way.

No matters if I set:

$grid[“height”] = “100”;

or:

$grid[“height”] = “400”;

the grid has the same size, but if I set:

$grid[“height”] = “800”;

the grid grows more than the page size. If I set:

$grid[“height”] = “100%”;

The grid is showed about 40% of the body section. No matters if i use 200%, 300%…if remains always in same size.

Any idea?

1 Answers
Abu Ghufran Staff answered 1 year ago

Hello,

You can refer this demo code: (line 27-34)

https://gist.github.com/gridphp/6532b68c780d2e31f7e526c8a34471a4

It resizes grid on loadComplete event to the height of it’s container div.

Basically, the body tag height is not by default 100% but it increases based on it’s content. If you put grid in some div and set it’s height static or dynamic (as on line 55) then grid should expand as in above code.

_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Tasagore Seibei replied 1 year ago

Perfect, I’ve used that code plus this:

And all works ok, thks!

Your Answer

16 + 8 =

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?