ProgressOn/Off with delay?

Hello

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.

dhxLayout.cells(“b”).progressOn();

… wait a few seconds…

dhxLayout.cells(“b”).progressOff();

Hello,

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: w3schools.com/jsref/met_win_settimeout.asp

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