I am using 3.6 pro, with xml whenever possible.
In my ui, I am noticing that the event firing for grid.load isn’t working as expected.
It was my understanding that you could use grid.load(loadxml,callback) and the callback would fire equivalently to the onXLE event.
From support post in forum:
“Grid loading triggers 2 events onXLS - when loading starts and onXLE - when loading ends
Basically onXLE is the necessary one, at that moment data loaded and rendered. ( also you can use second parameter of load method which can be a callback method )”
This is not what is happening at all.
In watching the console, along with alerts
The callback [grid.load(loadxml,callback)] fires before the GET for the xml is even executed, which certainly doesn’t match the onXLE event, and doesn’t match the onXLS event either.
For example:
recentOffersGrid.load(“recentOffers.xml”,callback);
function callback(){
alert(“Load callback”);
}
In console/display:
Alert is displayed - Load callback OK
There is no GET for recentOffers.xml in the console
Click OK
GET for recentOffers.xml appears and grid is loaded
Can someone please explain this behavior? Ideas for resolving?
I need to have 3 grids on in my layout, loading structure from xml using load(), then loading data using updateFromXML() in the callback.
Using onXLE is problematic, as it would fire multiple times, once for structure and then again for the data.
FYI, I am loading structure separately to handle multiple languages