"Smart Rendering with dynamic loading and buffering" problem

“Smart Rendering with dynamic loading and buffering” as shown in the example link below works great without any problems when scrolling.
[url]http://dhtmlx.com/docs/products/dhtmlxGrid/samples/14_loading_big_datasets/11_pro_prefetch.html[/url]

However, when i use the same code within a window and layout, the dynamic loading shows gaps while scrolling. below is the snippet of the code.

document.getElementById("winVP").style.display = 'block';	
var dhxWins = new dhtmlXWindows();
dhxWins.enableAutoViewport(false);
dhxWins.attachViewportTo("winVP");
var layoutWin = dhxWins.createWindow("w1",0,0,600,600);

dhxLayout = new dhtmlXLayoutObject(layoutWin, "1C", "dhx_web");
dhxLayout.cells("a").setText("Demo");

dhxGrid = dhxLayout.cells("a").attachGrid();
dhxGrid.setImagePath("codebase/imgs/");
dhxGrid.setHeader("id,Data,posStart");
dhxGrid.setInitWidths("100,300,100")
dhxGrid.setColTypes("ro,ro,ro");   
dhxGrid.init();
dhxGrid.enableSmartRendering(true);
dhxGrid.loadXML("php/dynload_slow.php");

Snippet of Server side code:

$conn = mysql_connect("$host","$user","$pass")or die("cannot connect"); 
if (!$conn) {
	die('Could not connect: ' . mysql_error());
}
mysql_select_db("$db",$conn) or die("cannot select DB");

header("Content-type: text/xml");
echo("<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n");
   
if(isset($_GET["posStart"]))
       $posStart = $_GET['posStart'];
else
       $posStart = 0;
	
if(isset($_GET["count"]))
	$count = $_GET['count'];
else
	$count = 50;
    
$tblname = "tblx";
$sql = "SELECT id,value from $tblname";
    
if($posStart==0){
	$sqlCount = "Select count(*) as cnt from ($sql) as tbl";
	$resCount = mysql_query ($sqlCount);
	$rowCount=mysql_fetch_array($resCount);
	$totalCount = $rowCount["cnt"];
	$_SESSION['totalcount'] = $totalCount;
}
    
$sql.= " LIMIT ".$posStart.",".$count;
$res = mysql_query ($sql);
  
print("<rows total_count='".$_SESSION['totalcount']."' pos='".$posStart."'>");   
while($row=mysql_fetch_array($res)){
       print ("<row id='".$row['id']."'>");
       print("<cell><![CDATA[".$row['id']."]]></cell>");
       print("<cell><![CDATA[".$row['value']."]]></cell>");
       print("<cell><![CDATA[".$posStart."]]></cell>");
       print("</row>");
}
print("</rows>");  
mysql_close($conn);

Any help on how to resolve this issue??


ah … one more thing …
the scrolling works fine with dhx_skyblue, dhx_blue and dhx_black skins.
The problem seems to be only with “dhx_web” skin.
team DHTMLX … may be this might help isolate the issue.

same problem here.

Please, try to set the height of your row with setAwaitedRowHeight() method:
docs.dhtmlx.com/doku.php?id=dhtm … drowheight

Such issue may occur the the default height was modified.

I have exactly this problem when to when im trying to use smart buffering. Im working in C# MVC and when I do a grid in a view that dosent have a masterpage it works fine but when I put the same code in a view with a masterpage I get this problem with white spaces if I use the scrollbar(not if I scroll with the mouse tho).

I have tryed adding my mygrid.setAwaitedRowHeight(25); but that even makes it worse.

Using DHTMLXGrid 3 pro and dhx_skyblue(changed that with same result).

I solved it. It was the DOCTYPE that was wrong apperntly.

Hello Guys,

Recently i faced similar issue with grid rendering in smartrendering mode while scrolling. Grid buffers but while painting it skips 3-4 rows which is intermittent ,which causes Object required/childIndex/childnodes is null related javascript error.

I saw above post with similer issues. Appreciate if share your understanding and feedback on this issue.

Apart from smart rendering i m using splitAt also.

Thanks
Amit

The most common culprit - custom css on the page, which affects height of row.

You can:

a) remove custom css which changes height of TD|TR elements
b) use setAwaitedHeight command to define the actual height of rows
c) enable multiline mode in which sizing works differently and grid will adjust self to actual row’s height

I am also having this same problem. No custom css. Using dynamic loading with xml and smart rendering. Grid is in an iframe that is being displayed within a tab that is within a layout. The grid is an an asp.net mvc 4 view that has a master page. If I scroll slow, it works fine. But if I click quickly, it falls apart, I end up with gaps, or sometimes, the rows are all rearranged.

My doctype is

I’ve tried different skins but the problem is still there. Standard version doesn’t have access to that setAwaitedHeight function but I haven’t changed the row height at all.

Unfortunately the issue issue cannot be reproduced locally.
Please, provide with a demo link or a complete demo, where the issue can be reproduced.
Here you can find a tutorial:
docs.dhtmlx.com/doku.php?id=othe … leted_demo