Running jqGrid resize after user shows / hides columns

In jqGrid, after users decide to delete the column (s), the grid width becomes smaller. Therefore, I think it would be advisable to cause a resize at this point using $("#myGrid").trigger("resize") . However , to which jqGrid event should this be added?

I tried to start resizing manually in the Firebug Console after using Chooser Column, and it worked fine.

I also tried the recommendations in this matter , but without any results.

+3
jquery jquery-ui jquery-plugins jqgrid
Jul 01 '11 at 16:14
source share
2 answers

I solved my problem:

  $("#myGrid").jqGrid("columnChooser", { done: function() { $("#myGrid").trigger("resize"); } }); 
+6
Jul 01 2018-11-11T00:
source share
— -

If you are using the latest jqGrid (currently 4.1.1), the bug fixes I described earlier are already included in the jqGrid main code. So, as you can see from the demo, everything seems to be working correctly, doing nothing.

0
Jul 01 2018-11-11T00:
source share



All Articles