예제 #1
0
        protected override void OnDragDrop(DragEventArgs drgevent)
        {
            base.OnDragDrop(drgevent);
            ColumnNode  node        = (ColumnNode)drgevent.Data.GetData(typeof(ColumnNode));
            Point       pt          = this.PointToClient(new Point(drgevent.X, drgevent.Y));
            SectionNode sectionNode = this.GetNodeAt(pt) as SectionNode;

            if (sectionNode != null)
            {
                if (sectionNode == this.nodeGrouping)
                {
                    this.nodeSorting.Nodes.Clear();
                }

                if (!ExplorerTree.NodeExist(sectionNode, node.Text))
                {
                    SortColumnNode newNode = new SortColumnNode(node.Text,
                                                                ExplorerTree.ascendingIcon,
                                                                ExplorerTree.sortColumnMenu);

                    newNode.SortDirection = ListSortDirection.Ascending;
                    this.SelectedNode     = newNode;
                    this.CheckNode(newNode);
                    sectionNode.Nodes.Add(newNode);
                    this.reportModel.ReportSettings.SortColumnCollection.Add(new SortColumn(newNode.Text,
                                                                                            ListSortDirection.Ascending,
                                                                                            typeof(System.String), false));
                    this.OnPropertyChanged("Sort_Group");
                }
            }
        }
예제 #2
0
        protected override void OnDragDrop(DragEventArgs drgevent)
        {
            base.OnDragDrop(drgevent);
            ColumnNode  node        = (ColumnNode)drgevent.Data.GetData(typeof(ColumnNode));
            Point       pt          = this.PointToClient(new Point(drgevent.X, drgevent.Y));
            SectionNode sectionNode = this.GetNodeAt(pt) as SectionNode;

            if ((sectionNode != null) && (!ExplorerTree.NodeExist(sectionNode, node.Text)))
            {
                if (sectionNode == this.nodeGrouping)
                {
                    this.nodeSorting.Nodes.Clear();
                    AddGrouping(sectionNode, node);
                }
                else
                {
                    AddSorting(sectionNode, node);
                }
            }
        }