Hi guys,
I have 2 grids. When selecting a row in the first, it shows relevant data on the second.
An event onRowSelect is taking care of that.
The first thing the function does, is clearing the second grid.
function job_is_selected(row_id, ind){
targets_grid.clearAll();
job_num = jobs_grid.cellById(row_id, jobs_grid.getColIndexById(“ID”)).getValue();
// then, getting new data
var loader = dhtmlxAjax.postSync(perl, "data=job_num"
targets_grid.loadXMLString(loader.xmlDoc.responseText);
}
The problem is the ClearAll() doesn’t work so the grid looks stuck with wrong data for a few seconds.
Now, I found out that if I have dhtmlXWindows object open and shown before calling the ClearAll function, it does work.
function job_is_selected(row_id, ind){
dhxPlugins = new dhtmlXWindows();
… preparation of window …
window_obj.window(“cnsl_window”).show();
targets_grid.clearAll();
job_num = jobs_grid.cellById(row_id, jobs_grid.getColIndexById("ID")).getValue();
// then, getting new data
var loader = dhtmlxAjax.postSync(perl, "data=job_num"
targets_grid.loadXMLString(loader.xmlDoc.responseText);
}
What’s going on here…?
Thanks,
Guy.