On tree check box selection how can we select all child records?

I am using tree grid. on check box selection I need to selection all child records