mleibman / SlickGrid

A lightning fast JavaScript grid/spreadsheet
http://wiki.github.com/mleibman/SlickGrid
MIT License
6.82k stars 1.98k forks source link

Slickgrid not displaying properly after changing grid options #1066

Open jandsmit opened 9 years ago

jandsmit commented 9 years ago

After changing grid options with setOptions like this:

subGrid.setOptions({ editable: true });

... the grid does not redraw correctly. All columns are compressed to the left. Resizing a column restores the grid and everything is ok.

I found it to be a bug in slick.grid.js (2.2) in function absBox(elem). The first 'while' loop allows elem to become null and there the grid breaks.

I tested by simply inserting:

if (elem == null) break; - directly after the while and that solves the problem.

6pac commented 9 years ago

A patch for this issue has been added to the 'alternative master' repo. Repo: https://github.com/6pac/SlickGrid Latest release: https://github.com/6pac/SlickGrid/releases

The latest release has added examples for Bootstrap and the jQueryUI Accordion that may help provide a standardised page for testing, and demonstrate a known good configuration.