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"); } } }
private void SetAvailableFields(AbstractColumn af) { ColumnNode node = new ColumnNode(af.ColumnName, columnIcon); node.Tag = this.nodeAvailableFields; node.SelectedImageIndex = columnIcon; this.nodeAvailableFields.Nodes.Add(node); }
private void AddGrouping(SectionNode sectionNode, ColumnNode node) { this.nodeSorting.Nodes.Clear(); GroupColumnNode groupNode = new GroupColumnNode(node.Text, ExplorerTree.ascendingIcon, ExplorerTree.sortColumnMenuPath); groupNode.SortDirection = ListSortDirection.Ascending; this.SelectedNode = groupNode; sectionNode.Nodes.Add(groupNode); this.reportModel.ReportSettings.GroupColumnsCollection.Add(new GroupColumn(groupNode.Text, 1, ListSortDirection.Ascending)); this.OnPropertyChanged("Grouping"); }
private void AddSorting(SectionNode sectionNode, ColumnNode node) { SortColumnNode sortNode = new SortColumnNode(node.Text, ExplorerTree.ascendingIcon, ExplorerTree.sortColumnMenuPath); sortNode.SortDirection = ListSortDirection.Ascending; this.SelectedNode = sortNode; sectionNode.Nodes.Add(sortNode); this.reportModel.ReportSettings.SortColumnsCollection.Add(new SortColumn(sortNode.Text, ListSortDirection.Ascending, typeof(System.String), false)); this.OnPropertyChanged("Sorting"); }
protected override void OnItemDrag(ItemDragEventArgs e) { base.OnItemDrag(e); ColumnNode node = e.Item as ColumnNode; if (node != null) { if (node.ImageIndex == ExplorerTree.columnIcon) { this.SelectedNode = node; if (node != null) { this.DoDragDrop(node, DragDropEffects.Copy | DragDropEffects.Scroll); } } } }
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); } } }
private void SetGroupColumns() { foreach (GroupColumn groupColumn in this.reportModel.ReportSettings.GroupColumnsCollection) { var groupNode = new GroupColumnNode(groupColumn.ColumnName, groupContextMenuPath); if (groupColumn.SortDirection == ListSortDirection.Ascending) { groupNode.ImageIndex = ascendingIcon; } else { groupNode.ImageIndex = descendingIcon; } this.nodeGrouping.Nodes.Add(groupNode); foreach (var p in this.reportModel.ReportSettings.AvailableFieldsCollection.Where(p => (p.ColumnName != groupColumn.ColumnName))) { var cn = new ColumnNode(p.ColumnName, columnIcon); groupNode.Nodes.Add(cn); } } }
private void SetAvailableFields (AbstractColumn af) { ColumnNode node = new ColumnNode(af.ColumnName,columnIcon); node.Tag = this.nodeAvailableFields; node.SelectedImageIndex = columnIcon; this.nodeAvailableFields.Nodes.Add(node); }
private void SetGroupColumns() { foreach (GroupColumn groupColumn in this.reportModel.ReportSettings.GroupColumnsCollection) { var groupNode = new GroupColumnNode(groupColumn.ColumnName,groupContextMenuPath); if (groupColumn.SortDirection == ListSortDirection.Ascending) { groupNode.ImageIndex = ascendingIcon; } else { groupNode.ImageIndex = descendingIcon; } this.nodeGrouping.Nodes.Add(groupNode); foreach (var p in this.reportModel.ReportSettings.AvailableFieldsCollection.Where(p => (p.ColumnName != groupColumn.ColumnName))) { var cn = new ColumnNode(p.ColumnName,columnIcon); groupNode.Nodes.Add(cn); } } }
private void AddGrouping(SectionNode sectionNode,ColumnNode node) { this.nodeSorting.Nodes.Clear(); GroupColumnNode groupNode = new GroupColumnNode(node.Text,ExplorerTree.ascendingIcon, ExplorerTree.sortColumnMenuPath); groupNode.SortDirection = ListSortDirection.Ascending; this.SelectedNode = groupNode; sectionNode.Nodes.Add(groupNode); this.reportModel.ReportSettings.GroupColumnsCollection.Add(new GroupColumn(groupNode.Text, 1,ListSortDirection.Ascending)); this.OnPropertyChanged ("Grouping"); }
private void AddSorting(SectionNode sectionNode, ColumnNode node) { SortColumnNode sortNode = new SortColumnNode (node.Text, ExplorerTree.ascendingIcon, ExplorerTree.sortColumnMenuPath); sortNode.SortDirection = ListSortDirection.Ascending; this.SelectedNode = sortNode; sectionNode.Nodes.Add(sortNode); this.reportModel.ReportSettings.SortColumnsCollection.Add(new SortColumn(sortNode.Text, ListSortDirection.Ascending, typeof(System.String),false)); this.OnPropertyChanged ("Sorting"); }