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
455
Data bind the tree after creation
posted

If I attempt to data bind the tree after the tree is created the control is never drawn, but if I data bind during the control creation the tree is drawn properly. Any ideas?

Code:

        $("#TreeContainer").igTree({
            singleBranchExpand: true,
            parentNodeImageUrl: 'images/directory.png',
            leafNodeImageUrl: 'images/directory.png',
            bindings: {
                textKey: 'Name',
                valueKey: 'FolderID',
                childDataProperty: 'ChildFolderCollection'
            }
        });

// data binding
 $("#TreeContainer").igTree('option''dataSourceType''json');
 $("#TreeContainer").igTree('option''dataSource', result.FolderCollection);