Пример #1
0
        void ViewTree_BeforeDragNode(object sender, DevExpress.XtraTreeList.BeforeDragNodeEventArgs e)
        {
            MyData obj = (MyData)this.GetDataRecordByNode(e.Node);

            if (obj == null || obj.InnerData == null)
            {
                return;
            }

            if (obj.InnerData is STViewGroupsInfo)
            {
                e.CanDrag = false;
            }
        }
Пример #2
0
        void Tree_BeforeDragNode(object sender, DevExpress.XtraTreeList.BeforeDragNodeEventArgs e)
        {
            ABCCommonTreeListNode obj = (ABCCommonTreeListNode)this.GetDataRecordByNode(e.Node);

            if (obj == null || (FieldNodeInfo)obj.InnerData == null)
            {
                return;
            }

            FieldNodeInfo data = (FieldNodeInfo)obj.InnerData;

            if (data.Type == FiledNodeType.Table)
            {
                e.CanDrag = false;
                return;
            }
        }