madcapnmckay / Knockout-UI

A home for rich UI components based on KnockoutJS
264 stars 51 forks source link

JSON data to tree #11

Open Umar-Mukhtar opened 11 years ago

Umar-Mukhtar commented 11 years ago

I am unable to load the tree when json data is passed to children object in the model. Why is that?

When -children: [] and dynamically assign when json data received tree fails.

When children: [ // { name: "Annabelle", id : '1', isOpen : true,isChecked:true, children : [ // { name: "Arnie", cssClass : 'page', id : '5',isChecked:true, children : [] }, // { name: "Anders", cssClass: 'page', id: '6', isChecked: true, children: [] }, // { name: "Apple", cssClass: 'page', id: '7', isChecked: true, children: [] } // ] // } this works like charm. Why dynamic assignment is not bieng done. Please help

Umar-Mukhtar commented 11 years ago

Okay, i have been able to bind the json data to model at last, Using the custom binding handler. I need to select the checkboxes from parent to child (all childs), does your library support any of these functionalities. I have grabbed the selectnode event but can't get the selected node hierarchy. Please provide any example

asif-rahman commented 11 years ago

Umar-Mukhtar can u please share your json code?