Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by richard white on Feb 21, 2009 11:23
open dhtmlx forum
grid.enableSmartRendering(true) for grids with tree structure;

Hi

we have a grid with approx 1000 normal grid rows in it. the grid also contains approx 10 items that have sub rows.

we are using the grid.enableSmartRendering(true); and it is loading fine.

however, when we open one of the tree items with sub rows then the whole grid turns white for a few seconds before reappearing with the item open. is there a way to stop it from going white?

if we use the grid.enableSmartXMLParsing(true); function instead then it does stop the grid from turning white when we open one of the tree items but the grid takes too long to load initially because of the many normal grid items

we have tried combining the two functions but this does not work

do you have any suggestions on how we could get around this please

thanks
Answer posted by Support on Feb 23, 2009 07:43
>>we have tried combining the two functions but this does not work
treegrid and sub-grids are mutual exclusive

>>the grid also contains approx 10 items that have sub rows. 
>>we are using the grid.enableSmartRendering(true); and it is loading fine
Please be sure to add 
      grid.enableMultiline(true)
To the init code of the grid. 

>>turns white for a few seconds before reappearing with the item open. is there a way to stop it from going white
When you open subgrid - master grid renders container for sub-grid and start loading of data for it. If there are a lot of data - it may take significant amount of time, and all that time, container for sub-grid will be visible as white area.

You can try to use 

grid.attachEvent("onSubGridCreated",function(subgrid){
    subgrid.entBox.style.display="none";
    return true;
})
grid.attachEvent("onSubGridLoaded",function(subgrid){
    subgrid.entBox.style.display="";
    subgrid.setSizes();
    subgrid.callEvent("onGridReconstructed",[])
    return true;
})



Answer posted on Feb 27, 2009 08:27
hi we have tried this but it does not work, it still show as white.

note: it is not sub grids we are using but we are basically mixing a tree structure with a grid structure - most of the rows appear as grid rows but approx 10 rows are folders with items inside them. it is when we open the folder items that the whole grid turns white for a couple of seconds. it also turns white when we close the folder, and continues to turn white every time we open or close any folder

thanks
Answer posted by Support on Mar 03, 2009 06:50
>>and continues to turn white every time we open or close any folder
How much sub-items you have in such folder? If there are a lot of them it still can be a performance issue, but in case of pure treegrid it can be solved by enabling smartRendering mode
Answer posted on Mar 07, 2009 12:23
it still occurs even for items that only have 1 sub item!
Answer posted on Mar 07, 2009 12:24
it is also not pure treegrid even though we do have the smart rendering enabled
Answer posted by Support on Mar 09, 2009 04:10
Unfortunately issue can't be reconstructed locally, if it still occurs for you - please provide any kind of sample where problem can be reconstructed.