I'm trying to get Knockout to work the treeview so I needed to get the "data-bind" attribute added to the checkbox that is generated.
I couldn't get it to work in the NodeDataBound when using e.Node.Attributes.Add("data-bind", "myBinding: myObservableArray")...This wasn't being added to the actual HTML which Knockout needs.
So I tried using the NodeTemplate to be able to customize the HTML checkboxes. Anyway, Child elements are checked when it's parent is using NodeTemplates with "CheckChildNodes = true"
<input type="checkbox" value="<%# DataBinder.Eval(Container, "Id") %>" data-bind="myBinding: myObservableArray" />