-
Notifications
You must be signed in to change notification settings - Fork 423
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
Grouping on column + using scrollRowToTop or scrollRowToView #229
Comments
Good catch. I don't have time to fix it properly, but this is the right approach - for row |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
When grouping is enabled for a column one cannot use scrollRowToTop or scrollRowToView simply with the row index as it is not accounting for the added height introduced by groups. For example, if I have a grid with row height set to 22 pixels and it has 1000 rows of data and in those rows there is 100 groups and I want to scroll to record 500, scrollRowToTop is doing 500 * 22px = height of div to scroll to.
Now since I have groups and lets say 50 groups come before record index 500 then it really should be (500 (record index) * 22px )+ (50 (number of groups before) * 22px) = actual height of div to scroll to.
Basically what i'm saying is it appears slidGrid does not support scrollRowToTop or scrollRowToView when using groups as the correct row never comes into view.
I've come up with this hack code to try to overcome this limitation but it only seems to work accurately if the grid is sorted in ascending order by the id field.
I'm using the (2.3.16) build of SlickGrid
The text was updated successfully, but these errors were encountered: