JLynch7 / SlickGrid

A lightning fast JavaScript grid/spreadsheet
https://github.com/jlynch7/SlickGrid/wiki
MIT License
89 stars 76 forks source link

Scrolling using mouse wheel only works in the non frozen section of the grid #47

Open alexeib opened 11 years ago

alexeib commented 11 years ago

Scrolling using mouse wheel only works in the non frozen section of the grid

alexeib commented 11 years ago

Note that this only happens when you set columns dynamically. Digging into code, it seems that the mousewheel hook is done in finishInitialization() function and has a check on whether there are any frozen columns or not. So if frozen columns are added later (or the option to freeze them is turned on later), mouse wheel on frozen column pane does not work. slick grid should make a check whenever options or columns are changed to see whether mouse scrolling needs to be set up.

kyrios commented 11 years ago

It's not working for me even when I'm configuring the frozen columns during initialization of the grid.

Follwup: I forgot loading jquery.mousewheel.js

schhunchha commented 7 years ago

for me scrolling doesn't work if on frozen columns. I set frozen column option later in the stage after rendering has happened. initial it is always -1.

do we need frozenColumn check for below. if (jQuery.fn.mousewheel && ( options.frozenColumn > -1 || hasFrozenRows )) { $viewport .bind("mousewheel", handleMouseWheel); }

I removed that frozencolumn condition and works for me. Want to know any implications.