Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Tanu Dua on Sep 11, 2009 01:14
open dhtmlx forum
Scrollbar in Enable distributed Parsing

Hi,

We are using dhtmlxGridfromTable in one of the projects with a large set of data . So , we had to enable distributed parsing for the grid.But on enabling distributed parsing , the scrollbar of the grid does not appear for the grid and the user has to use the browser scrollbar for scrolling which is not a great user experience.

I have referred the following example for my implementation :

http://www.dhtmlx.com/docs/products/dhtmlxGrid/samples/14_loading_big_datasets/04_pro_grid_performance.html#code.

I have tried the following options , it makes the scrollbar but scroll does not move as in the above example.
currentgrid.objBox.style.overflowX = "scroll";
currentgrid.objBox.style.overflowY = "scroll";

Could you please let me know how to enable scrollbar while performing distributed parsing.



Answer posted by Support on Sep 11, 2009 01:47
In common case, smart rendering mode is much more preferable ( it gives a real performance boost, while distributed parsing just prevents browser freezing ) 
           samples\14_loading_big_datasets\13_pro_srnd_static.html 

>>I have tried the following options
Normally grid already has the overflow:auto for the same container. So if content is overflowing the container - scroll must appears. 

>>how to enable scrollbar
It is enabled by default. 
Are you using auto-height mode in the same time? Auto-height will resize grid to remove the v-scrolls. 
Also, how the height of grid's container is defined in your case? 

Answer posted by Tanu dua on Sep 13, 2009 22:27
We have to user Distributed Parsing as we are doing grouping and filtering in a grid which does not work correctly with Smart Rendering.

Do we have a callback function to know when the whole grid is rendered ?

Thanks


Answer posted by Tanu Dua on Sep 14, 2009 00:16
I have got a callback when the Distributed Parsing is done for the grid which is : onDistributedEnd , but this callback does not work for me may be because I am creating grid from the table and not from the XML.

Please let me know if there is a way to get the callback.

Answer posted by Support on Sep 14, 2009 04:34
In case of init from html table you can try to use 
               <table class="dhtmlxGrid" gridHeight="500" //or any other desired height value here


>>Please let me know if there is a way to get the callback.
<script>
         function set_handlers(){
                mygrid.attachEvent("onDistributedEnd",custom_code);
         }
</script>
               <table class="dhtmlxGrid" name="mygrid" onbeforeinit="set_handlers()" ...

Beware, that onDistributedEnd is relative new event, and may not available in older versions of dhtmlxgrid. 
Answer posted by Tanu Dua on Sep 14, 2009 05:01
Hi ,

I tried the above option with the following code:

<table id="basicgridbox" name="basicgridbox" gridHeight="600px" onbeforeinit="basicgridbox.enableDistributedParsing(true,5,50);set_handlers();" >
<script>
 function set_handlers() {
                    alert("in inithandlers " + basicgridbox);
                    basicgridbox.attachEvent("onDistributedEnd",doDistEnd);
             }

            function doDistEnd() {
                alert("doDistEnd");
            }

</script>

I have got an alert "in inithandlers" and also distributed parsing is working but didn't get the callback "doDistEnd".
Answer posted by Tanu Dua on Sep 14, 2009 05:14
Hi,

I have searched onDistributedEnd callback functions on all dhtmlx*.js but couldn't find that.

We are using dhtmlxTreeGrid v.2.1 Professional edition version.

Please let me know how to enable this callback
Answer posted by Support on Sep 14, 2009 08:59
a) you can update your code to latest version (2.5)
or
b) you can contact us directly at support@dhtmlx.com and we will send you an updated dhtmlx.js for version 2.1