Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Rocky on Jun 04, 2007 20:53
open dhtmlx forum
TreeGrid: Div not showing when handler function called

I have implemented the treeGrid with checkboxes, as follows:

//Other Grid initializing stuff
FILTER_PANE.setOnCheckHandler(doWhenChecked);


function doWhenChecked(row, cell, stage){

//this line show a div
winList['updating'].open();

Perform other fucntionalities with JSON remote call

}



If I perform winList['updating'].open(); seperately, my div opens as it should.
If I call the function doWhenChecked(row, cell, stage) by checking a box, the function operates properly, except that the div is not becoming visible as it should.

Why does the div not become visible if called within this other function. I am not sure if it is related to the grid handler , or some other problem.
Answer posted on Jun 05, 2007 11:50
I don't think that problem related to the component.
The only difference between calling the function separately and from grid component is used scope

In case of calling function directly it called in global window scope
In case of calling function on grid event it called in grid object scope ( "this" point to grid object )

Maybe it somehow harm your code, you can try the next

function doWhenChecked(row, cell, stage){
    //this line show a div
    window.setTimeout(function(){
        winList['updating'].open();
    },1);

It will be fully equal to direct function call


Answer posted by Inga (Support) on Dec 01, 2014 18:47

Not much can be said in addition to the reply above, but you also can check php spreadsheet and javascript charts library and find out what we have probably missed in our explanation.