Hi,
I am working on virtual scrolling with dynamic (changing) row height. I think I have it mostly working. This is how it works:
– calculate average row height from the currently displayed data: divide data table height with number of rows in the table
– use this row height in updatepager() to calculate total div height as well as 'top' div height
– use the same row height for calculating next page to load in pageVisible()
– every time new/updated data is loaded, average row height along with total height and 'top' div height is recalculated. This new row height is used for paging in pageVisible()
– scrollTop is adjusted in updatepager() to account for average row height change as data currently loaded/displayed is changed so the current row appears at the same location as before (this is not working 100% yet)
I tested it with local data only (loadonce is true).
Any comments on this approach? Where can I submit the code?
Thanks,
Erik
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top