Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
105
igTree with children of different types
posted

Is it possible to build a tree where different branches lead to different things. For example:

var TreeRoot = [{ "Title": "Something", "Something's Children": [{}]}, { "Title": "Something Else", "Something Else's Children": [{}] }];

$("#tree").igTree({

   dataSource: TreeRoot,

   loadOnDemand: true,

   dataSourceUrl: '/home/getdata',

   bindings: {

      textValue: 'Title',

      childDataProperty: 'Something's Children',

      binding: {

         textValue: 'Children1'

         ...

      },

      childDataProperty: 'Something Else's Children',

      binding: {

         textValue: 'Children2'

         ...

      }

   }

});