3

In jqGrid, after a users chooses to remove a column(s), a grid's width becomes smaller. Therefore, I think it would be appropriate to trigger a resize at this point using $("#myGrid").trigger("resize"). However, to what jqGrid event should I attach this?

I tried triggering a resize manually on the Firebug Console after using the Column Chooser and it worked well.

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

Community
  • 1
  • 1
Donald Taylor
  • 9,634
  • 15
  • 62
  • 91
  • Does anyone know how to handle this in angular? It seems that this is not a valid option, when attempting to resize – Fallenreaper Feb 08 '19 at 18:03

2 Answers2

7

I solved my own problem:

     $("#myGrid").jqGrid("columnChooser", {
        done: function() {
          $("#myGrid").trigger("resize");
        }
      });
Donald Taylor
  • 9,634
  • 15
  • 62
  • 91
0

If you use the last version of jqGrid (currently it is 4.1.1) the bug fixes which I described before are already included in the main code of jqGrid. So how you can see from the demo all seems to work correct without doing anything.

Oleg
  • 219,533
  • 32
  • 395
  • 775