enableSmartRendering and scrollbar problems

I am having a problem with my treegrid and smart rendering. I was able to get everything working on an example but not sure why its having problems in my application. I tried to make things similar such as fixed height window and nothing seemed to make a difference. Attached is the code and a screenshot of the problem. By commenting out the 1 line enableSmartRendering(true) everything displays properly.


  • enableSmartRendering(true)
  • Load page
  • Scrollbar size does not match the number of total lines. Bar size indicates there may be 5 more lines to scroll down when there are actually 20+
  • Scrolling down displays a few more records and the scrollbar adjusts its size slightly smaller
  • After scrolling to the end there are missing records and no ability to scroll further
  • Expanding a large group does not resize the scrollbar as expected

I’m not sure if it matters but I am using the TreeGridGroupConnector on the php side, I have a sample file working correctly with the exact same php so I don’t think the problem is on that side.
scrollbar.zip (17.6 KB)

Please, try to use setAwaitedRowHeight() method:
docs.dhtmlx.com/doku.php?id=dhtm … drowheight

I tried setAwaitedRowHeight() previously and it does give better results but no value passed in seems to be correct. What is the proper way to get the exact row height of the current rows so I know I’m passing it the correct number? Using 25 cuts the grid list off early so there is no scrollbar and about 5 empty rows at the bottom, decreasing the number gives more rows but there always seems to be a few missing.

Also are there any issues with using this with a treegrid and collapsible groups? I can get the collapsed list almost correct using the above methods but once I expand all the groups only half the records are visible before the scrollbar ends.

You may get the actual height of your row in the console of the browser.
For example:

If issue still occurs - please, provide us with a complete demo where it can be reproduced.
Here you can find a tutorial:
docs.dhtmlx.com/doku.php?id=othe … leted_demo

The row height helped a little, here is an explanation of the current problem.


grid1.attachEvent(“onXLE”, function() { grid1.sortRows(0);grid1.expandAll(); });

  • Commenting out the last line the list loads with groups collapsed and scrollbar is correct size (previously this did not always work)
  • Loading list with expandAll() the scrollbar is the same size as the collapsed version so when you scroll to the bottom there are still more records which are not shown
  • Comment out smart rendering, everything shows correctly

Unfortunately the issue cannot be reconstructed locally.
You may try to call expandAll() method with a timeout.
If issue still occurs for you - please, provide with a complete demo, where the issue can be reproduced.
Here you can find a tutorial about creating a complete demo:
docs.dhtmlx.com/doku.php?id=othe … leted_demo