hasChildrenTemplate

The template string or function for determining whether a TreeView node has children. This is used to draw the expand/collapse handles and initialize related functionality.

<script type="text/javascript">
    jQuery(function ($) {
        $("#treeview").shieldTreeView({
            dataSource: {
                data: [
                    { text: "Item One" },
                    { text: "Item Two", items: [
                        { text: "Child 1" },
                        { text: "Child 2" }
                    ] }
                ]
            },
            hasChildrenTemplate: function(item) {
                return item.items && item.items.length > 0;
            }
        });
    });
</script>