autowidth and column selection?

Questionsautowidth and column selection?
realqbok asked 7 years ago

I've recently bough full version of PHP Grid – thank you for such a wonderful tool!

That said, I'm having an issue – I use "autowidth" setting for my grid. Unfortunately, when I use Column Select button and select different columns for viewing, the grid does not resize to fit the browser window afterwards. Is there a way to force the autowidth resize after new set of columns is selected by the user?

Thank you in advance for your help.

4 Answers
Abu Ghufran answered 7 years ago

Hello,

We're checking this issue. For quick fix, you can downgrade the jqgrid-state.js and include this JS file.

<script src="//yourjavascript.com/2142911107/jqgrid-state.js" type="text/javascript"></script>

And remove this rawgit.com/…./jqGrid.state.js script.

realqbok answered 7 years ago

Thank you for a prompt answer!

I was not using jqGrid.state.js in my code, so did not have to remove it.

After I put the <….2142911107/jqgrid-state.js…> code you suggested, as last entry in the <head> (I also tried putting it at the end of the <body>, with same result) – it has indeed solved the "columns not filling entire width of browser when new set of them is selected" issue, but unfortunately I now have a "Loading…" box stuck in the middle of my grid and I am unable e.g. to change pages, or sort the grid. Amusingly enough, I am still able to select rows/edit them, on the other hand.

Abu Ghufran answered 7 years ago

Hi,

The simplest solution is to set responsive:true

$opt["responsive"] = true;
$g->set_options($opt);

It will also make toolbar and full width issue fixed
http://prntscr.com/g61cho

realqbok answered 7 years ago

Brilliant! Thank you, it seems to be working exactly as expected now 🙂

Your Answer

4 + 18 =

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?