Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Madhu K on Nov 02, 2007 02:22
open dhtmlx forum
afterCall in loadXMLString

I am trying to call a function that sets the focus to a link after the grid is loaded. But this is not working. I am using dhtml grid 1.2 version.
The line of code i have added is as follows:

// The function to be called after grid load
var setFocusAfterGridLoad = function()
{
    dhtmlGrid.setActive(false);
    setFocus("lnkRealized");
    dhtmlGrid.setActive(false);
}

// Call setFocusAfterGridLoad function after grid load
dhtmlGrid.loadXMLString(xmlString,setFocusAfterGridLoad);
Answer posted on Nov 02, 2007 02:37
loadXMLString is sync. operation ( because it doesn't require client-server interaction ) so you can use

dhtmlGrid.loadXMLString(xmlString);
setFocusAfterGridLoad();