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
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";
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!
You can call JS function, where list1 is grid, 500 is height.
jQuery(“#list1”).jqGrid(‘setGridHeight’, ‘500’);
Your Answer