How to make Jqgrid frozen column word-wrap

Starting with version 4.3.2 jqGrid supports Events which allows to register multiple callbacks (event handler). Old internal callbacks like _complete were removed.

Instead of the line in the demo

$grid[0].p._complete.call($grid[0]);

you can use now

$grid.triggerHandler("jqGridAfterGridComplete");

UPDATED: The current version of jqGrid have a bug in the line. It will be used this instead of ts:

if($.isFunction(p.resizeStop)) { p.resizeStop.call(this,nw,idx); }

instead of

if($.isFunction(p.resizeStop)) { p.resizeStop.call(ts,nw,idx); }

The event jqGridResizeStop don’t have the problem. So I suggest to use it instead:

$grid.bind("jqGridResizeStop", function () {
    resizeColumnHeader.call(this);
    fixPositionsOfFrozenDivs.call(this);
    fixGboxHeight.call(this);
});

See the modified demo.

UPDATED 2: I posted the bug report. I can inform you that the fix is already applied in the main code of jqGrid on the github.

Just published version 4.5.0 includes the fix.

Leave a Comment