grid not displayed fully in iphones n safari browser.

Questionsgrid not displayed fully in iphones n safari browser.
web05 asked 5 years ago

The grid is not displayed fully and also there is no scrollbar.
so i can only see first 5 columns of a 10 column table.
any solutions?

7 Answers
Abu Ghufran answered 5 years ago

Hello,

Please check after adding following.

$grid["autowidth"] = true;
$grid["autoresize"] = true;
$g->set_options($grid);

It's not fully responsive but work after zooming in mobile devices.

web05 answered 5 years ago

where to add this code?

web05 answered 5 years ago

do i have to edit under index.php?

Abu Ghufran answered 5 years ago

Yes, demos/editing/index.php
And run this demo code to test.

web05 answered 5 years ago

Thanks for the quick reply!

1) i tried with the above code. the entire table is shrinked and we need to resize it.

with the normal code i am not able to see the scrollbar using my iphone but, when i am running though online iphone simulation i am getting the scrollbar..

2) i also want to resize selected column width. how to do it?

Abu Ghufran answered 5 years ago

1) After some research, i found this reason for scrollbar in iphone.

"This isn't a bug in jqgrid, it's a limitation of the iphone's browser. The iphone browser has no concept of scrollbars on any elements."
Source: http://www.trirand.com/blog/?page_id=393/bugs/grid-scrollbar-is-not-available-on-iphone

Suggested solution is to add grid height to auto, to set height based on # of records.
e.g.

$opt["height"] = "auto";
$g->set_options($opt);

2) To resize column width, you need to define column properties and set, e.g.
$col["width"] = "30";

http://www.phpgrid.org/docs/#Selecting_Specific_Columns

Your Answer

19 + 4 =

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 / 5. Vote count:

We are sorry that this post was not useful for you!

Let us improve this post!