Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Wolfgang Philipp on Apr 01, 2008 07:09
open dhtmlx forum
Rows not showing with Smart Rendering in Firefox

Hello there!

I have strange problems using Smart Rendering for my grid in Firefox (works fine with IE). Well, it should work with both browsers.

When i scroll down, browser makes a new request, as it should be using Smart Rendering. But most times there is a blank space at the beginning of the new rows, sometimes including a lot of rows which are not displayed.

Well, most time rows are shown when you scroll up and down but sometimes there is no way that row is shown and it stays blank.

I already found some questions here, where people had the same problem.

There were some answers (f.e. when you use default height for rows or that script has to return at least as much datasets as the value of parameter count. I`m pretty sure, that we use the default height for rows, so it shouldnt be the problem. I couldnt use the function you suggested in another thread anyway (something like setAwaitedRowHeight...). Why does it say it is not a function?

My script returns enough rows, so the second answer isnt helping me too.

Any other thougts?

Thx in advance!!
Answer posted by Support on Apr 02, 2008 01:07
There are two possible reasons of problem

a) Incorrect server response - the server response must contain rows@pos attribute , which defines position in grid, where incoming xml must be inserted. If value of attribute is not correct - it may cause visual problems similar to described one.

b) Not default height of row, which causes incorrect calculations.


>>Why does it say it is not a function?
It was introduced in version 1.5, if you are using earlier version of code , you can achieve the same result by
        mygrid = new ....
        mygrid._srdh=NN;
where "NN" is height of row


If problem still occurs for you - please send any kind of sample where it can be reconstructed , you can send it directly to support@dhtmlx.com
Answer posted by Wolfgang Philipp on Apr 02, 2008 07:40
Thx for your answer.

Well, i think there is no mistake in server-side script. The value of the pos attribute in <rows>-Tag is identical to the parameter posStart. But maybe we are using not the default height for rows. If i scroll down to a position in the grid should the parameter posStart be the rownumber of the first visible row in the grid? Because in my case the script which is generating the XML-Input is invoked with the parameter posStart, which has a value less than the first visible row number. Could this be the problem i am dealing with?

So i need to set the value of _srdh to the height i am using with my grid? If so, do i have to use the height of the row including the border or without the border? How many pixels is the default height?

Thx in advance!


Answer posted by Support on Apr 02, 2008 08:22
>>If i scroll down to a position in the grid should the parameter posStart be the rownumber of the first visible row in the grid?
Not necessary , if there unfilled rows above current position grid can request them as well ( it based on prefetch settings )

>>If so, do i have to use the height of the row including the border or without the border? How many pixels is the default height?
The height of row include all related to it borders.
The native skins have next row heights
    default,clear,modern,light skins - 20
    mt,xp,gray skins - 22
   
Answer posted by Ansgar on Jul 20, 2008 09:28
Hello,
I have the same problem as the original poster.
Meaning, Firefox is not showing all rows when using Smart Rendering.
I'm using Ver. 1.6 build 80603. I already set the default height to 20 by using
mygrid.setAwaitedRowHeight(20)

But there are still only the first 5-6 rows shown.

Anymore hints how to solve this in Firefox? Opera and IE are working fine...

Tnx in advance!


Answer posted by Support on Jul 21, 2008 02:47
Please try to use attached js file instead of original one.

If problem still occurs - please provide any kind of sample or demo link where it can be reconstructed ( you can send it directly to support@dhtmlx.com )
Attachments (1)
Answer posted on Jan 11, 2010 13:36
Hi,

I am using Smart Rendering without dynamic option and experiencing the same problem.  I am using dhtmlxgrid.js v.2.5 build 91111
I updated dhtmlxgrid_srnd.js with the one you posted earlier and it didn't make a difference. The problem with rows not displayed is happening on firefox (Mozilla/5.0) on linux.  Also on both firefox/linux and IE7/windows xp i am having a problem when master checkbox is checked/unchecked. It freezes browser for a long time. Here is my code. My xml contains about 1900 rows.
<html>
<head>
<script src="include/dhtmlxcommon.js" type="text/javascript"></script>
<script src="include/dhtmlxgrid.js" type="text/javascript"></script>
<script src="include/dhtmlxgridcell.js" type="text/javascript"></script>
<script  src="include/ext/dhtmlxgrid_filter.js" type="text/javascript"></script>
<script  src="include/ext/dhtmlxgrid_srnd.js" type="text/javascript"></script>
<link rel="STYLESHEET" type="text/css" href="include/dhtmlxgrid.css">


</head>

<body>
      <div id="gridbox" style="width:100%; height:340px; background-color:white;overflow:hidden"></div>

<script>

mygrid = new dhtmlXGridObject("gridbox");
mygrid.setImagePath("imgs/");

mygrid.setHeader(",Product Type,View,Start Time,Stop Time,Size (MB),Satellite,Instrument,Format,Version");
mygrid.attachHeader("#master_checkbox,#select_filter,,#text_filter,#text_filter,,#select_filter,#select_filter,#select_filter,#select_filter");
mygrid.setStyle("font-size:12pt; text-align:left;", "font-size:12pt;padding-left:14px;text-align:left;","", "");
mygrid.setInitWidths("35,110,100,150,150,50,85,110,70,90");
mygrid.setColTypes("ch,ro,ro,ro,ro,ro,ro,ro,ro,ro");
mygrid.setColAlign("left,left,left,left,left,left,left,left,left,left");
mygrid.setColSorting("str,str,,str,str,int,str,str,str,str");
mygrid.enableAutoWidth(true);
mygrid.init();
mygrid.enableSmartRendering(true);
mygrid.loadXML("test.xml");
</script>
</body>
</html>

I can send you my xml file if it will be helpful.

thanks in advance

Victoria
Answer posted by Stanislav (support) on Jan 12, 2010 04:12
>>It freezes browser for a long time
Checkbox operations require row-rendering, so to check all checkboxes, all rows need to rendered first. It can take some time. 

>>I can send you my xml file if it will be helpful.
Yep, please send xml file to support@dhtmlx.com
Answer posted by Victoria on Jan 12, 2010 06:45
Hi Stanislav,

Thank you for the response. I just emailed the xml file.

Regarding the checkbox slowness... Is there a workaround? Would distributed parsing make a difference ? FAST mode ? Anything ? I am willing to purchase the professional edition if that offers some options that would make it work better.  In my case the number of rows will vary (using this to display search results). But it will never exceed 2000 rows.

Thanks!

Victoria
Answer posted by Stanislav (support) on Jan 12, 2010 08:31
>>Is there a workaround? 
There is no direct solution. To change row's value you need to render row first , checking all rows means rendering all rows. 
For which use-case you need to use those checkboxes?

It possible to just store current value of mater-checkbox and adjust the state of rows only when they are becoming visible. It will work fast but grid's API related to checkboxes will be no-reliable.