Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slickgrid not displaying properly after changing grid options #2

Open
jandsmit opened this issue May 22, 2015 · 3 comments
Open

Slickgrid not displaying properly after changing grid options #2

jandsmit opened this issue May 22, 2015 · 3 comments

Comments

@jandsmit
Copy link

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.

@ddomingues
Copy link
Owner

Hi @jandsmit. Could you create a jsFiddle that simulate this issue?

@jandsmit
Copy link
Author

Hi,

If I can find some time, I would. But unfortunately, I don’t have that time… sorry.
But the problem is so clear, there is no need for a simulation, in my opinion.
Just by looking at the code, you can see that things go wrong because there is no check for a NULL value.

But then again, whenever I find some time, I will create a jsFiddle… but that would be the first time for me there; need to figure out how it works ;)

Jan

Op 21 jul. 2015, om 13:31 heeft Diego Henrique Domingues [email protected] het volgende geschreven:

Hi @jandsmit https://github.com/jandsmit. Could you create a jsFiddle https://jsfiddle.net/ that simulate this issue?


Reply to this email directly or view it on GitHub #2 (comment).

@ronrother
Copy link

Hi @ddomingues

I created #26 with a suggestion to fix this issue. Essentially, it happens when columns are set using setColumns (without passing them in the grid constructor) followed by a call to setOptions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants