Categories | Question details Back To List | ||
Expand row when item is dragged on it (before checking child items) Hi, Can you provide me with a solution for the following problem: I have 2 grids. The first grid is dynamically filled from the database when the + sign is pushed or the .openItem(rowId) is called. When I drag an item of the second grid onto the first one the function onDragGroup() is called. In this function I check if the item already exists. That works but of course only when the child items are loaded. What I tried in the onDragGroup() function was first set .openItem(rowId) and afterwards check if the item already exists. But for some reason (asynchonous probably) the check happens before the openItem so he drags the item in a group where he already exist in. Can you help me open his items first and then check if he already exists? Thx, filip Answer posted by Stanislav (support) on Oct 15, 2009 02:16 The data loading is async. so real child data adding occurs not exactly after openItem call, but some time later, when xml data is loaded. The simplest solution would be to change the way of data loading to the sync. one , it can be done by next code modification grid.attachEvent("onDynXLS",function(id){ var loader = dhtmlxAjax.getSync("some.php?id="+id); //some.php - name of server side script grid.parse(loader.xmlDoc.responseXML); return false; }) |