ProgressOn/Off with delay?


I want to use the progressOn function in dhtmlx Layout. After turning on the progress the progress animation has to be shown a few seconds before it will be turned off. But I can’t find a delay function to implement it this way. Is there maybe another solution.


… wait a few seconds…



you may window.setTimeout() function

I did not found such a function in the documention, but this works for me!

setTimeout is window method, not the method of layout API:

You should use a callback function to turn off the progress rather than using a timer. for example I call myLayout.cells(“b”).progressOn() before loading my grid and to turn the progress off after the data in the grid is loaded:

myGrid.attachEvent(“onXLE”, function (grid_obj, count) { myLayout.cells(“b”).progressOff(); });

so the progress shows only while the grid is parsing and loading xml data