TreeList右键功能及常见设置
1、TreeList设置内容不可编辑,在OptionBehavior中的Editable属性设置为false即可.GridControl同样
2、TreeList获取节点的内容,node.GetDisplayText(object ColumnID),参数为获取列的编号;
3、TreeList鼠标右键绑定事件:
private void MenuList_MouseDown(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Right) { MenuList.ContextMenu = null; TreeListHitInfo hInfo = MenuList.CalcHitInfo(new Point(e.X, e.Y)); TreeListNode node = hInfo.Node; if (node != null) { MenuList.FocusedNode = node; MenuList.ContextMenuStrip = contextMenu; } } }