Author Topic: Extra space at bottom of grid using virtualY = true  (Read 3004 times)

ralph1996

  • Pro Ultimate
  • Jr. Member
  • *
  • Posts: 80
    • View Profile
Extra space at bottom of grid using virtualY = true
« on: September 30, 2016, 05:19:02 am »
One of our requirements for a grid replacement is the ability to query many records (thousands) without using paging.  We are loading the data locally so it is all in the page to increase scrolling performance.  However in order to get fast performance we need to use virtualY = true (We are not using virtualX = true since rows can be of different heights and can scroll horizontally).

When I created a grid with over 5000 records the scrolling was amazingly fast which is great.  However in the middle of scrolling we woudl get a gap between the last row displayed and the bottom of the grid even when more rows were after teh last row displayed.  And when you got to the last row there wodul also be a gap instead of the last row abutting the bottom of the grid.  I noticed that it seemed that there were a fixed number of rows it would display so if there were enough rows that were more than one line high, it woudl fill the grid, however if all or most of the rows were only one line high it would leave a gap of varying height based on the content of the rows.

I was able to reproduce the issue wiht the bottom of the grid having a gap with a smaller data set and am including a jsFiddle with that here: http://jsfiddle.net/uj97h4o3/2/

IN orrder to use teh grid in our application we need to be able to scroll large amounts of data, but cannot have the gaps becuase they are not aesthetically pleasing as you can guess.  Using the virtualY = false is not an option since teh performance with thousands of rows is very poor.

Thank you for your help.

We really like the grid and want to purchase it if we know we can overcome the issues.  There are a couple more issues I will be posting as well.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Extra space at bottom of grid using virtualY = true
« Reply #1 on: September 30, 2016, 11:36:20 am »
In virtualY mode, there is empty space at the bottom when scrolled to bottom most row, which can't be avoided.

I don't see the other mentioned issue ( empty space at the bottom even when not scrolled to bottom ) in your jsfiddle. This issue is also not there in the online demos.

Edit:
Anyhow if you get empty space at bottom while scrolling ( not to bottom ), fix is mentioned here http://paramquery.com/forum/index.php?topic=1688.0
« Last Edit: September 30, 2016, 08:33:06 pm by paramquery »

ralph1996

  • Pro Ultimate
  • Jr. Member
  • *
  • Posts: 80
    • View Profile
Re: Extra space at bottom of grid using virtualY = true
« Reply #2 on: September 30, 2016, 09:53:45 pm »
The fix you mention is not really acceptable since we do not have fixed row heights.  Based on the contents or wrapped cells the rows will have different heights.  Attached is a screen shot of the grid wiht the spacing at the bottom - This is ther initial displayonce the grid is resized to the appropriate container size.  Although the gap exists prior to resizing as well.

When we have a lot of data the gap at the bottom will vary in size as you scroll teh grid.  Sometimes as much as 1/3 of the grid is blank.

Here is a jsFiddle with teh same data we are using in this screen shot.  However the jsFiddle does not exhibit the issue even after the resize is used.  Unclear why - but the code for the grid and the data was pulled straight out of our rendered page.

http://jsfiddle.net/uj97h4o3/4/






paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Extra space at bottom of grid using virtualY = true
« Reply #3 on: September 30, 2016, 10:39:39 pm »
rowHeight doesn't change/ fix the height of rows, but used by the grid to estimate the number of rows in viewport.

Less the value of rowHeight, more the number of rows in viewport and there won't be empty space at the bottom.