Callback doesn't wait long enough

[code]ToolBar.attachEvent(“onClick”, function(id) {
if(id == “refresh”) {
var selectedId = TestGrid.getSelectedRowId();
TestGrid.clearAndLoad(“getGridData.php”, doAfterGridRefresh(selectedId) );
//setTimeout(doAfterGridRefresh, 1000, selectedId);
}
});

function doAfterGridRefresh(id) {
alert(id);
TestGrid.selectRowById(id);
}[/code]

If I use the code as shown, I see an alert with the correct id, but the expected grid row will not be selected. It seems to be calling the callback function before the grid is finished loading. If I use the setTimeout line, everything works as expected. Any ideas?

The problem was the event. The callback function executes immediately, but the onXLE event waits for the grid to finish loading. FYI: the professional version is required to have access to the onXLE event.

Unfortunately the issue cannot be reconstructed locally.
If issue still occurs for you - please, provide a complete demo where the issue can be reconstructed.