Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Eric Stauffer on Apr 15, 2009 05:58
open dhtmlx forum
callback function in updateFromXml

I have the following code:

var command = '/cs/c001/loadParticipantGroup.php?group=' + p_grp;
objselectedPersonnel.updateFromXML(command,true,true,getCounts());
objselectedPersonnel.refreshFilters();

and

getCounts(){

alert("In Get Counts");

}

The documentation states, "afterCall - function, will be executed after refresh completted" seeming to indicate the callback function will be executed after teh grid is updated. However, my experience is that getCounts() is called before the xml is updated in the grid.

I attempted to use loadXML but that overwrites the content of the grid and specifying an XML string in updateFromXml resulted in an error. Is there any way to update the grid from an XML string or force updateFromXml to call the callback after refresh?

Answer posted by dhxSupport on Apr 15, 2009 08:25

Call back parameter in the updateFromXML method shouldn't contain brackets 

objselectedPersonnel.updateFromXML(command,true,true,getCounts);