Height of grid to cell phone

QuestionsHeight of grid to cell phone

Hello! How can I set a height of the grid for the size of the PC screen and another height for the smarthphone?
I define the height with $ grid [“height”] = “250”; but I am interested in defining another height when the screen size is that of a cell phone.
Thank you very much for your help!

4 Answers
Abu Ghufran Staff answered 4 years ago

You can use global is_mobile() function that is part of grid library. e.g.

if (is_mobile())
  $opt["height"] = "100%";
else
  $opt["height"] = "500";
_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Javier Albornoz (Jujuy-Argentina) answered 4 years ago

Thanks Abu, One more please, how can I change the height property of a grid? For example from a js function called when pressing a button?
From already thank you very much!

Abu Ghufran Staff answered 4 years ago

You can call JS function, where list1 is grid, 500 is height.

jQuery(“#list1”).jqGrid(‘setGridHeight’, ‘500’);

_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Javier Albornoz (Jujuy-Argentina) answered 4 years ago

Thak you ver much!

Your Answer

0 + 15 =

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?