Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Ryan on May 28, 2008 09:51
open dhtmlx forum
Loading indicator for expandall function

Is there a function or a solution to display a loading image/text indicator for the expandall function on dhtmlxtreegrid.

My company just recently purchased the 1.6 enterprise license.
Answer posted by Support on May 29, 2008 04:21
The expandAll operation is a sync. one , so you need not any special event, basically the next may work

show_loading();
grid.expandAll()
hide_loading();

But in real life the code described above will not work, because browser just has no time to render loading message.
It can be rewritten in next way, which must work correctly

show_loading();
window.setTimeout(){function(){
    grid.expandAll()
    hide_loading();
},1);   // the 1ms delay will give a time to browser to render loading message