不懂事的小男孩

DevExtreme学习笔记(一)treeView(搜索固定、节点展开和收缩)注意事项
var treeConfig1 = dxConfig.treeView(obj_Question.treeDataSource1);
        treeConfig1.selectionMode = 'single';
        treeConfig1.expandedExpr = "isExpanded";//树节点关闭
        treeConfig1.selectNodesRecursive = false;
        treeConfig1.searchEnabled = true;//设置搜索框显示
        treeConfig1.height = "100%";//搜索框固定头部,树滚动
        treeConfig1.onSelectionChanged = function (e) {
            var selectedNode = obj_Question.dxTreeView1_1.getSelectedNodesKeys();
            if (selectedNode.length > 0)
                obj_Question.dxTreeView1_1.unselectAll();
        }
        treeConfig1 = getDxTreeViewConfig(treeConfig1);

  

var item1 = $('<div class="col-sm-4" />').height("100%");
            obj_Question.dxTreeView1 = $('<div />').appendTo(item1).dxTreeView(treeConfig1).dxTreeView("instance");
//设置外框100%

 

posted on 2019-08-14 09:29  不懂事的小男孩  阅读(638)  评论(0编辑  收藏  举报