Hi , please suggest me how can we not allow other events to trigger , while loading xgrid with xml data .(if any in built functions).
Can we apply , onXLS and onXLE ?
Hi , please suggest me how can we not allow other events to trigger , while loading xgrid with xml data .(if any in built functions).
Can we apply , onXLS and onXLE ?
You may try to create a new variable which can help you to now if the data was loaded and block the needed event if it’s not.
For example:
var loaded=false
mygrid.attachEvent("onXLS", function(grid_obj){
loaded=false
});
mygrid.attachEvent("onXLE", function(grid_obj,count){
loaded=true
});
mygrid.attachEvent("onRowCreated", function(rId,rObj,rXml){
if (loaded==true){/*some custom code*/}
else return false
});
Also you may try to attach event as a callback of load method:
mygrid.loadXML("grid.xml", function(){
mygrid.attachEvent("onRowCreated", function(rId,rObj,rXml){
//some custom code
});
});