Wijmo TreeNode Refresh after dataItem change

Posted by: andrew.k.yohn on 18 July 2019, 8:22 am EST

    • Post Options:
    • Link

    Posted 18 July 2019, 8:22 am EST

    This fiddle demonstrates my issue:

    https://jsfiddle.net/yohnan/8y6odm7u/

    I am using the formatItem event of TreeView to place CSS classes on the tree node based on information in the node’s dataItem. When I update the dataItem and call TreeNode.refresh(), the format call is not updating the content. Please advise how to have a tree node’s refresh after change to dataItem and call the formatItem.

  • Posted 19 July 2019, 5:17 am EST

    Hi Andrew,

    You may use the loadTree of TreeView to update the tree view using the updated itemsSource. Please refer to the code snippet and the sample below:

    theTree.selectedNode.dataItem.flag = flip;
    theTree.selectedNode.refresh();
    theTree.loadTree(true);
    

    You may also refer to the sample below:

    http://jsfiddle.net/dyca2suz/

    Regards,

    Ashwin

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels