您的位置:首页 > 编程语言 > C#

[C#/DevExpress]treeList相关方法总结

2020-08-17 17:25 1761 查看

treeList设置焦点方法:

this.treeList1.Focus();//当前编辑的单元格光标消失;

treeList取消编辑方法:

this.treeList1.CancelCurrentEdit();

        //总结:根据什么依据不能编辑,就论自己的情况而定,ShowingEditor 是显示编辑,如果取消编辑为真
        //e.Cancel = true;  //就是不允许编辑
        private void treeList1_ShowingEditor(object sender, System.ComponentModel.CancelEventArgs e)
        {
            if (this.treeList1.FocusedNode.Level == 0)
            {
                e.Cancel = true;
            }
        }

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: