AI智能
改变未来

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

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;
            }
        }

赞(0) 打赏
未经允许不得转载:爱站程序员基地 » [C#/DevExpress]treeList相关方法总结