Author Topic: How to set grid to align top row after scrolling?  (Read 1020 times)

Uni

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 1
    • View Profile
How to set grid to align top row after scrolling?
« on: August 13, 2021, 01:08:01 pm »
Hello,

in older versions (4 and before), after scrolling, top row was always aligned to top (e.g. https://paramquery.com/pro/demos40/infinite_scroll),
but in newer versions, top row was no longer aligned to top (e.g. https://paramquery.com/pro/demos77/infiniteV).

Is it possible to set such feature in newer versions?

We tried this:
Code: [Select]
let grid  = pq.grid("#grid_json", obj);
grid.on( "scrollStop", function( event, ui ) {
    grid.scrollRow( { rowIndxPage: grid.getViewPortIndx().initV } );
} );
but clicking on scrollbar arrow down, it jumps back on current row.

Thanks
« Last Edit: August 13, 2021, 01:11:03 pm by Uni »

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: How to set grid to align top row after scrolling?
« Reply #1 on: August 13, 2021, 04:41:48 pm »
scrolling is entirely different in v4 and later versions.

v4 uses virtual scrollbars while v>=5 uses native scrollbars and I don't see any way to mimic v4 scrolling with native scrollbars.