Session Overview. Stand Tall with the. Paul Guggenheim. Paul Guggenheim & Associates. UltraWinTree Overview Uses Features

Similar documents
Session Overview. Session Overview. ProDataSet Definition. Climb Aboard the ProDataSet Train. Paul Guggenheim. Paul Guggenheim & Associates.

About PGA. Overview. Belly up to the UltraToolBar. Paul Guggenheim. Paul Guggenheim & Associates

UPDATING DATA WITH.NET CONTROLS AND A PROBINDINGSOURCE

Managing Data in an Object World. Mike Fechner, Director, Consultingwerk Ltd.

HYPERION SYSTEM 9 PERFORMANCE SCORECARD

SORTING DATA WITH A PROBINDINGSOURCE AND.NET CONTROLS

ARCH-11: Designing a 3-tier framework based on the ProDataSet. Gunnar Schug proalpha Software

New Progress Data Types Paul Guggenheim

DEFINING AN ABL FORM AND BINDING SOURCE

You can link completely different files into one by adopting a file to one or more of your topics.

What are the characteristics of Object Oriented programming language?

Kendo UI. Builder by Progress : Using Kendo UI Designer

An OO Code Generator A Live OO Project

eschoolplus+ Cognos Query Studio Training Guide Version 2.4

Access: Using Forms for Data Entry and Editing

COMPUTER CONCEPTS. Windows

InfoPower for FireMonkey 2.5

Query Studio Training Guide Cognos 8 February 2010 DRAFT. Arkansas Public School Computer Network 101 East Capitol, Suite 101 Little Rock, AR 72201

Kendo UI Builder by Progress : Using Kendo UI Designer

Kendo UI. Builder by Progress : What's New

Course Content. Objectives of Lecture 24 Inheritance. Outline of Lecture 24. Inheritance Hierarchy. The Idea Behind Inheritance

ArtOfTest Inc. Automation Design Canvas 2.0 Beta Quick-Start Guide

ADVANTA group.cz Strana 1 ze 24

Course Content. Objectives of Lecture 24 Inheritance. Outline of Lecture 24. CMPUT 102: Inheritance Dr. Osmar R. Zaïane. University of Alberta 4

TECHNOLOGY COMPETENCY ASSESSMENT MODULE Microsoft Access

What s New In the Salesforce Winter 15 Release

SILVACO. An Intuitive Front-End to Effective and Efficient Schematic Capture Design INSIDE. Introduction. Concepts of Scholar Schematic Capture

The DBMS accepts requests for data from the application program and instructs the operating system to transfer the appropriate data.

InfoPower for FireMonkey 3.0

c360 Relationship Explorer/Charting User Guide

Programming with ADO.NET

Access 2003 Introduction to Report Design

GO! with Microsoft Access 2016 Comprehensive

Report Designer Report Types Table Report Multi-Column Report Label Report Parameterized Report Cross-Tab Report Drill-Down Report Chart with Static

FirePower 4.1. Woll2Woll Software Nov 3rd, Version 4.1 Supporting RAD Studio versions: XE7. FirePower 4.

Specification Manager

What s New in OpenEdge 11.4?

SPARK. User Manual Ver ITLAQ Technologies

PUSHING INFORMATION TO USERS

Event-based Programming

Rev Up to Excel 2010

Also, recursive methods are usually declared private, and require a public non-recursive method to initiate them.

MDA V8.1 What s New Functionality Overview

CA ERwin Data Modeler

Microsoft Excel 2010 Level 1

Reporting Center. Primary (Stand-Alone) Interface

Name Return type Argument list. Then the new method is said to override the old one. So, what is the objective of subclass?

C++ Important Questions with Answers

Ignite UI Release Notes

DATA Data and information are used in our daily life. Each type of data has its own importance that contribute toward useful information.

PART - I 75 x 1 = The building blocks of C++ program are (a) functions (b) classes (c) statements (d) operations

MULTIMEDIA COLLEGE JALAN GURNEY KIRI KUALA LUMPUR

Module 6: Binary Trees

An abstract tree stores data that is hierarchically ordered. Operations that may be performed on an abstract tree include:

Lesson 21 Getting Started with PowerPoint Essentials

Data Dashboard Navigation for Building Administrators

API Testing with GreenPepper Challenges and Best Practices

PAF Chapter Junior Section Name : Class: 5 Sec: Date: SECTION - A

Program and Graphical User Interface Design

Cornerstone Household: Introduction to Cornerstone: For Parents Page 1

Overview. CHAPTER 2 Using the SAS System and SAS/ ASSIST Software

Introduction to the Visual Studio.NET Integrated Development Environment IDE. CSC 211 Intermediate Programming

Learn about PowerPoint: Create your first presentation

lab MS Excel 2010 active cell

Getting Started in CAMS Enterprise

Copyright...7. Overview of General Ledger Processes Configuration...11

Customizing FlipCharts Promethean Module 2 (ActivInspire)

Policy Commander Console Guide - Published February, 2012

Creating and Running a Report

Modern Requirements4TFS 2018 Release Notes

SAP BEX ANALYZER AND QUERY DESIGNER

COURSE PROFILE: ENVISION USER TRAINING

The functions performed by a typical DBMS are the following:

Day 1 Agenda. Brio 101 Training. Course Presentation and Reference Material

Product Enhancements May 2011

Target Tracker Quick Start Guide Steps Parent Report

OrgPublisher 10.1 End User Help

Course Microsoft Dynamics 365 Customization and Configuration with Visual Development (CRM)

DASHBOARD PERFORMANCE INDICATOR DATABASE SYSTEM (PIDS) USER MANUAL LIBERIA STRATEGIC ANALYSIS TABLE OF CONTETABLE OF CONT. Version 1.

Microsoft Dynamics GP. Analytical Accounting

SECTION A: Introduction to Banner

Table of Contents. Enhancements provided at no additional charge as part of your annual support program

WEB TIME SUPERVISOR GUIDE

12/05/2017. Geneva ServiceNow Custom Application Development

Ignite UI Release Notes

Create a Seating Chart Layout in PowerTeacher

Microsoft Excel 2010 Basic

Tryton Administration Manual Documentation

Specification Manager

SAP BusinessObjects Analysis, edition for OLAP User Guide SAP BusinessObjects XI 4.0

SyncFirst Standard. Quick Start Guide User Guide Step-By-Step Guide

Numbers Basics Website:

Table of Contents. 1. Prepare Data for Input. CVEN 2012 Intro Geomatics Final Project Help Using ArcGIS

Glossary Unit 1: Hardware and Software

College of the Holy Cross Student Guide to the Student Academic Records System (STAR)

Model-view-controller View hierarchy Observer

Graphical Interface and Application (I3305) Semester: 1 Academic Year: 2017/2018 Dr Antoun Yaacoub

PAF Chapter Junior Section Name : Class: 5 Sec: Date: SECTION - A

Infragistics Windows Forms 16.2 Service Release Notes October 2017

SYLLABUS B.Com (Computer) VI SEM Subject Visual Basic Unit I

Transcription:

Stand Tall with the UltraWinTree Paul Guggenheim About PGA Working in Progress since 1984 and training Progress programmers since 1986 Designed seven comprehensive Progress courses covering all levels of expertise including - The Keys to OpenEdge Author of the Sharp Menu System, a database driven, GUI pull- down menu system. White Star Software Strategic Partner TailorPro Consultant and Reseller Tools4Progress Partner Major consulting clients include Acument Global Technologies, Buedel Foods, Canadian Bearings, Cloverdale Paints, Consolidated Foods, Foxwoods Casino, Indiana Packers Corporation, International Financial Data Services, Kenall Manufacturing and Medela Corporation. Head of the Chicago Area Progress Users Group Session Overview UltraWinTree Overview Uses Features Examples Create a Manual Tree in the Designer Review of OpenEdge ProBindingSource Single table bound Tree using Default View Style Uses Data Columns Single table bound Tree using Standard View Style Uses Node Text Column Single table bound Tree using Freeform View Style Custom Multiple Column Sets for one table

Session Overview Examples (continued) Parent/Child ProDataSetbound Tree using Default View Style Uses Column Set Layout Designer Parent/Child ProDataSetbound Tree using Standard View Style Uses Two Node Text Columns Parent/Child ProDataSetbound to Two Trees Uses Two Node Text Columns Recursive Relationship Company Organizational Chart Manual adding of nodes Node cutting and pasting UltraWinTree Uses Hierarchical Relationships Parent-Child Relationships (e.g. Customer-Order) Category and Grouping Recursive Relationships Definition: A relationship between occurrences of a particular table type and other occurrences of that same table type. Menu Options fixed levels or variable (recursive) File Systems Bill of Materials Organizational Chart Family Tree Geographic Categories Streets and Intersections UltraWinTree Features Features There are many, here are a few: Handles grid like columns or conventional nodes Works easily with ProDataSets Allows Multiple Column Sets for one table Can expand and contract specific nodes Cut, Copy and Paste Nodes from one branch to another Allows multiple lines per node Change the appearance of the node, the text, the column headers according to font, color and behavior. Allows changing the text of the nodes. Provides a column set layout designer

This tree was created manually using the Visual Designer without linking to the database or ProBindingSource. Select the UltraTreefrom the OpenEdgeUltra Controls Toolbox Dock the UltraTree to the Left.

Select the Nodes using the Collection Editor. Add nodes to the tree using the Add Child and Add Sibling buttons. Use Text for the description. Use Key for the class name of the type of tree. Define Temp-Table to store objects for each node. define temp-table tsample no-undo field samplename as char field sampleform as Progress.Lang.Object index samplename is unique samplename.

In the DoubleClickevent, check to see if the selected node exists in the tsample temp-table. METHOD PRIVATE VOID ultratreemain_doubleclick( INPUT sender AS System.Object, INPUT e AS System.EventArgs ): selnode = ultratreemain:selectednodes:item[0]. objecttype = selnode:key. find tsample where samplename = objecttype no-error. When creating the temp-table record, use the dynamic-new statement to store the sub-class form type into the sample variable of class form. if not available tsample then do: end. sample = dynamic-new objecttype() no-error. create tsample. assign tsample.samplename = objecttype tsample.sampleform = sample. sample:show(). Re-invoke windows that have been closed using the IsDisposed form property. else if not valid-object(sample) or cast(tsample.sampleform,"progress.windows.form"):isdisposed then do: end. sample = dynamic-new objecttype() no-error. assign tsample.sampleform = sample no-error. sample:show().

Rather than creating a duplicate form for the same type, use the Activate() method to bring to the front the form that is already created. else do: end. sample = cast(tsample.sampleform,"progress.windows.form"). sample:activate(). OpenEdge ProBindingSource The ProBindingSourceis an OpenEdge object that transfers data to and from.net UI objects. It typically maps fields from a temptable using a query or a ProDataSetto the fields defined in the ProBindingSource.NET UI ProBindingSource Query or PDS ProBindingSource Steps There are a few steps that need to be completed in order for the ProBindingSourceto communicate with an UltraWinTree. Define a temp-table that contains the fields that will be used in the UltraWinTree columns. Define a scrolling query based on that temp-table. Copy the database records into the temp-table. Open the query for the temp-table. Attach the query to the ProBindingSource. bs_file:handle = query qtfile:handle.

Single Table Default ViewStyle open query qtstudent for each tstudent. bsstudent:handle = query qtstudent:handle. The ProBindingSource bsstudent is set to the query qtstudent. The UltraTree sdatasourceproperty is set to the ProBindingSource in the Designer. Single Table Default ViewStyle By default, all columns from the ProBindingSource are displayed. The ShowExpansionIndicatoris set to CheckOnDisplay. Single Table Standard ViewStyle In order to display the node text and not the columns, the standard ViewStylemust be used.

Single Table Standard ViewStyle Rather than setting the DataSourcein the Designer, the SetDataBindingmethod may be used to bind the ProBindingSource to the UltraWinTree. ultratree1:setdatabinding(bsstudent, ""). ultratree1:viewstyle = Infragistics.Win.UltraWinTree.ViewStyle:Standard. Single Table Standard ViewStyle Both the DataSourceproperty and the SetDataBindingmethod enables the use of the ColumnSetGenerated event procedure. This event procedure is called when the DataSource property is set or when the SetDataBindingmethod executes. This allows for the assignment of the NodeTextColumnto any of the columns in the ColumnSet. e:columnset:nodetextcolumn = e:columnset:columns["fullname"]. Single Table Freeform ViewStyle The freeform ViewStyleallows the use of multiple column sets for a single table. It is necessary to use a ProDataSetfor the ProBindingSource. The mapping of fields from the ProBindingSource to the UltraWinTree is done manually in the userdefined maketree() method.

Single Table Freeform ViewStyle The column sets may be defined in the Designer before the ProBindingSource is bound to the UltraWinTree in the constructor method. Select the ColumnSets collection under the ColumnSettingsProperty node. Set the root column set to Student. Single Table Freeform ViewStyle From the UltraTree ColumnSet Collection Editor, add the desired column sets. Then add the desired columns to each ColumnSet. Single Table Freeform ViewStyle Add the desired columns to each ColumnSet. Set the Key to the name you want to refer to it in the procedure.

Single Table Freeform ViewStyle Once the columns have been defined in each column set, use the ColumnSetLayout designer to arrange the columns in the desired way. Single Table Freeform ViewStyle The user-defined method maketree() does the following: Read through each of the ProBindingSource records. Use the node add() method to set the key to the root column set to studentid. Set the values for first and last name columns in the student column set. Use the add() method to add the contact and academic column sets as child nodes below the student column set. Need to use the Override:ColumnSet property. Set the values for all columns in the contact and academic column sets. Parent/Child Default ViewStyle The student table is the parent table and the registration, offering, course, teacher and grade tables represent the child tables. ProDataSet is bound to the UltraTree in the Designer. The ColumnSetLayout Designer was used to hide unwanted columns from each columnset.

Parent/Child Default ViewStyle Within a class, the set-callbackmethod must be used rather than the set-callback-procedurethat is used in a procedure. dataset dsstudreg:set-callback("after-fill", "postfill", THIS-object). Notice that the this-objectsystem handle is used in place of the this-proceduresystem handle which is used for procedures. The SynchronizeCurrencyManageris set to yes so that any selection made by a user in the UltraWinTree is reflected in the ProBindingSource. Parent/Child Default ViewStyle A mouse double click and the enter key are captured to allow reporting of additional information. Parent/Child Standard ViewStyle This example is similar to the single table standard ViewStyle, since there is no binding to the UltraWinTreein the Designer and it uses the SetDataBinding method and ColumnSetGenerated events.

Parent/Child Standard ViewStyle There are automatically two column sets based upon the two temp-tables defined in the ProDataSet. Testing for the column set key allows the developer to apply the desired column to that particular column set. CASE e:columnset:key: WHEN "" THEN e:columnset:nodetextcolumn = e:columnset:columns["fullname"]. WHEN "tregistration" THEN e:columnset:nodetextcolumn = e:columnset:columns["coursename"]. end case. Two Trees One ProBindingSource There are two UltraWinTreesused that both execute the SetDataBinding method. treestudent:setdatabinding(bsstudentschedule,""). treeschedule:setdatabinding(bsstudentschedule,"tregistration"). Two Trees One ProBindingSource The SetDataBindingmethod gives the developer added flexibility over using the DataSource property, by allowing to specify the desired temptable buffer to be assigned to that particular UltraWinTree. Since there are two SetDataBindingmethods, there will be two ColumnSetGeneratedmethods that assign the desired node for that particular tree. Make sure that the SynchronizeCurrencyManageris set to yes and the ViewStyleis standard for both trees.

Organizational Chart Chief Executive Officer VP Sales VP Marketing Chief Financial Officer Chief Technology Officer Product Marketing Manager Services Marketing Manager VP Finance Controller Accounts Payable Manager Accounts Receivable Manager Organizational Chart An organizational chart is an example of a recursive relation. There are two entities, employee and position. A single employee may hold more than one position. A single position reports to only one immediately higher position, and a single position that is reported to can have many positions that report to it. Organizational Chart

Organizational Chart Because of the complex nature of a recursive relation, it is more convenient to not bind the ProBindingSourceto the UltraWinTreeand create the nodes manually. Two temp-tables temployeeand tpositionare defined that correspond to their respective database tables employee and position. Two ProBindingSourcesare defined which also correspond to the temployee and tposition temptables. Two queries qtemployeeand qtpositionare also defined based on their respective temp-tables. Organizational Chart After the temp-tables are loaded, each query is opened and assigned to each ProBindingSource. The first tpositionrecord is read that has zero for the ReportsToPositionID field. The add method for the nodes collection is used to create the nodes with the PositionIDbeing the key and concatenation of the employee FullNameand PositionName being used for the node text. node1 = treeposition:nodes:add(string(tposition.positionid), fullname + "- + tposition.positionname). Organizational Chart The addsubnodemethod is executed, passing the newly created node object and the PositionIDof that node. this-object:addsubnode (node1,tposition.positionid).

Organizational Chart To execute the recursion, the addsubnodemethod is called within itself: METHOD PUBLIC VOID addsubnode( parentnodeas Infragistics.Win.UltraWinTree.UltraTreeNode, pparentid as int): for each tposition where tposition.reportstopositionid = pparentid, temployee of tposition: node1 = parentnode:nodes:add(string(tposition.positionid), fullname + "-" + tposition.positionname). this-object:addsubnode (node1,tposition.positionid). end. Organizational Chart Since the employee s picture, start date and salary need to be in sync with the users selection on the UltraWinTree, the following elements must be present. The employee s picture start date and salary are bound to the bsemployee ProBindingSource. The position number is assigned to the UltraWinTree key. When a node is selected, the tpositionrecord is found based upon the positionidin the key, then the temployee record is found from the tposition record. By repositioning the employee query based upon this employee record will automatically populate the picture, start date and salary. Organizational Chart Edit

Organizational Chart Edit Organizational Chart Edit Organizational Chart Edit

Organizational Chart Edit To enable cutting and pasting in an UltraWinTree, set the AllowCutand the AllowPastesettings to true in the Override properties section. Organizational Chart Edit To enable multi-select capability in the UltraWinTree, set the Override:SelectionTypeto SelectType:Extended. If allowing to edit the tree text is desired, then set the Override:LabelEdit to true. For cutting and pasting, use the CutSelectedNodes() and the PasteNodes() methods. Organizational Chart Edit To save the changes to the tree back to the database, do the following steps: Call the getsubnode() method and pass the top node and the top node key. Traverse through all the child nodes and update the tposition.reportstopositionid field with the parentid key. Recursively call getsubnode(). When getsubnode() completes, all tpositionrecords will be updated with current report to position information. Delete the old position records and re-create new position records based on the tposition temp-table.

Summary The UltraWinTreecan be an effective way to represent data in a business application. Parent/Child and recursive relationships can be represented easily with the UltraWinTree. The UltraWinTreeworks easily with temp-tables and ProDataSets through the ProBindingSource. The UltraWinTreeprovides a rich set of visual properties and methods allowing for robust user control for viewing and for update. Questions