ProgressON and ProgressOFF with VIEW

Hi everybody

Big unsolvable problem.

i’ve a layout with 2 cells. In Cell A i’ve a Tree and in Cell B i’ve a grid (def view) or a Chart (graph view).

When i click on Tree Row (onRowSelect event) I’d like activate immediately the progressON on Cell B and after my code, to show the “def” view or the “Graph” view.

Instead app runs in this way: Even if i have the progressON command as first line of code in onRowSelect event, the animation is not immediate but is activated only when the new view has shown, after some time, giving a bad feeling of “not running” application.

Why ? it seems to be a problem of “views” !

How can i bypass the problem ?

Many Many thanks

Hi

Could you please provide us complete demo including all correspondnig js/css files?
Please also add information regarding current and expected behaviour.

Here is a small guide how to make a complete demo:
docs.dhtmlx.com/tutorials__auxil … pport.html

If you don’t want to share your demo here for any reasons - you can send it to support@dhtmlx.com, if so - please include link to this forum topic.

If you’re using PRO Edition please send your demo to support@dhtmlx.com

Thank you Andrei but preparing a running demo with the problem is not very quick and now i’ve no time.

Anyway the issue is exactly as i described in my previous post: the animation should start immediately (being the first line of code in “onRowSelect” event). Instead it has shown at the end of my code when the view is ready to be shown.

Why ?

Hi everybody.

At the end, after hundreds of times, i built the demo.

I tried to build an environment as near as possible to my real app but as the problem happens with an Ajax call to a php script, i replaced it with some Ajax call to a xml file to obtain the same behaviour.

On The grid on the left you can click selecting the row. If you click on first field the app load a view on the right, clicking the second field you’ll load a second view.

Reading the code you’ll notice that in the event “onRowSelect” the progressOn function is called as first command, before the Ajax calls. I would expect the progressOn animation was shown immediately, running during the Ajax calls. Instead it’s shown after a long time, and after the wiew is shown (but the view is shown at the end of the calls !!!).
It’s a strange issue that gives to user a “not running” feeling. Of course this time disappear if i replace the Ajax call and instead grows up adding calls. Why ???

Many thanks for help.
demobuild1.zip (497 KB)

Hi

this probably due syncLoad - browser too busy to render other stuff and wait for response, script executing is blocked. try the following:

[code]Grid1.attachEvent(“onRowSelect”, function(id,ind) {
layout.cells(“b”).progressOn();
window.setTimeout(function(){
doLoad();
if(ind<1) {
layout.cells(“b”).showView(“view2”);
Grid2.clearAndLoad(“xml/big_datasets.xml”, function() {
layout.cells(“b”).progressOff();
});
}
else {
layout.cells(“b”).showView(“def”);
Grid2.clearAndLoad(“xml/big_datasets.xml”, function() {
layout.cells(“b”).progressOff();
});
}
}, 100);
});

function doLoad() {
var loader = window.dhx4.ajax.getSync(“xml/big_datasets.xml”);

};[/code]