You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Good catch. I don't have time to fix it properly, but this is the right approach - for row n, work out how many group total rows are between this row and the first row of the grid. We'd need to also allow the grid to call and external object to correct the row index, perhaps by passing the function to do the correction as a grid option?
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: