dhtmlxTree

When i clear the gride, its old selection don’t cleared . I must clear the selection explicity by

mygrid.selectedRows=new dhtmlxArray(0);

but that must happen automaticely. sorry for bad english

What command did you use for grid clearing?
All data, including selection, must be cleared by
    grid.clearAll();
( actually it contains exactly the same command line selectedRows=new dhtmlxArray(0); 
)

Also, if row deleted by
    grid.deleteRow - it also removed from collection of selected rows.