Unchecking any node the events should disappear

I have a tree on the left frame and a calendar on the right frame.When i check a node on the tree the corresponding events of the node are shown in the calender on right.Now the problem when i uncheck the node i want the events to disappear and give the calender in the same mode of view i.e year or week or day in which i was viewing the events.

There is onCheck event in tree that allows to process changing of checkbox state:

docs.dhtmlx.com/doku.php?id=dhtm … nt_oncheck

The setCurrentView method allows to set scheduler view:

docs.dhtmlx.com/doku.php?id=dhtm … urrentview