简体   繁体   English

锁定列剑道树列表

[英]lock a column kendo treelist

I am trying to lock a column in kendo ui treelist from here : http://docs.telerik.com/kendo-ui/api/javascript/ui/treelist 我正在尝试从此处锁定kendo ui treelist列表中的列: http : kendo ui treelist

<div id="treeList"></div>
<script>
    $("#treeList").kendoTreeList({
        columns: [
            { field: "id", locked: true, width: 100},
            { field: "name", width: 200 },
            { field: "age", width: 150 }
        ],
        dataSource: {
            data: [
                { id: 1, parentId: null, name: "Jane Doe", age: 22 },
                { id: 2, parentId: 1, name: "John Doe", age: 24 }
            ]
        }
    });

    var treelist = $("#treeList").data("kendoTreeList");
    treelist.lockColumn("age");
</script>

This is not changing any thing on the treelist. 这不会更改树列表上的任何内容。

It's working fine, just reduce your browser width and you'll see the only the column name is scrollable, id and age are freezed. 它工作正常,只需减小浏览器的宽度,您将看到唯一的列名是可滚动的,id和age被冻结。

Screen: 屏幕: 在此处输入图片说明

Docs: http://docs.telerik.com/kendo-ui/web/grid/walkthrough#frozen-columns-locked-columns 文件: http//docs.telerik.com/kendo-ui/web/grid/walkthrough#frozen-columns-locked-columns

Demo: http://dojo.telerik.com/UZAhE 演示: http : //dojo.telerik.com/UZAhE

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM