Here's an updated Dojo snippet. I have added my comments inline, but the key takeaway is that it uses the datasource change event handler to get notified when the checked state changes. However, note that this event bubbles (due to the nature of the DataSource), so it will be triggered multiple times.
To find nodes and select them, you need to have all the data rendered (via loadOnDemand: false), which will penalize the performance in large hierarchies. If that is not viable, you can use the expandPath method, if you have a way of finding the path to the node that needs to be expanded and selected.
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI