Comments
Richard Davies wrote: The UK has a good crop of technology pioneers in cloud computing - for example ElasticHosts, FlexiScale, Flexiant, OnApp - and also some strong government initiatives such as G-Cloud. We will have to see whether this kind of technical leadership converts into swift mass-market adoption or not.
Cloud Expo on Google News


2008 West
DIAMOND SPONSOR:
Data Direct
SOA, WOA and Cloud Computing: The New Frontier for Data Services
PLATINUM SPONSORS:
Red Hat
The Opening of Virtualization
GOLD SPONSORS:
Appsense
User Environment Management – The Third Layer of the Desktop
Cordys
Cloud Computing for Business Agility
EMC
CMIS: A Multi-Vendor Proposal for a Service-Based Content Management Interoperability Standard
Freedom OSS
Practical SOA” Max Yankelevich
Intel
Architecting an Enterprise Service Router (ESR) – A Cost-Effective Way to Scale SOA Across the Enterprise
Sensedia
Return on Assests: Bringing Visibility to your SOA Strategy
Symantec
Managing Hybrid Endpoint Environments
VMWare
Game-Changing Technology for Enterprise Clouds and Applications
Click For 2008 West
Event Webcasts

2008 West
PLATINUM SPONSORS:
Appcelerator
Get ‘Rich’ Quick: Rapid Prototyping for RIA with ZERO Server Code
Keynote Systems
Designing for and Managing Performance in the New Frontier of Rich Internet Applications
GOLD SPONSORS:
ICEsoft
How Can AJAX Improve Homeland Security?
Isomorphic
Beyond Widgets: What a RIA Platform Should Offer
Oracle
REAs: Rich Enterprise Applications
Click For 2008 Event Webcasts
SYS-CON.TV
Top Links You Must Click On


DataWindow.NET TreeView DataWindow Presentation Style
A powerful way to present and maintain data

One of the first things you'll notice when you open up the File->New->DataWindow dialog in DataWindow Designer 2.0 is the new TreeView DataWindow presentation style (see Figure 1). Once you've double-clicked on that, you'll see the same series of dialogs that you're already familiar with from the other presentation styles in which you select the data source, the tables to use, the columns in the tables, etc.

That is, it will be familiar until after you've finished defining the SELECT statement. Once you leave that, you encounter a new Report Definition dialog (see Figure 2). Here you indicate whether you want the TreeView DataWindow to be a Grid Style or not and which columns from the SQL statement should be associated with the first level on the TreeView. You can add other levels to the TreeView after it has been created, similar to the way you create additional group breaks in a group DataWindow (see Figure 3).

For the purposes of walking through the implementation of a TreeView presentation style DataWindow, we're going to use the DEPARTMENT and EMPLOYEE tables from the EAServer demo database supplied with PowerBuilder. The SQL statement we'll end up using is shown in Listing 1.

The result is shown in Figure 4. That figure also shows the new TreeView properties for the DataWindow. You'll notice that I have opened and closed folder icons for the TreeView items. Those aren't provided by default. Instead, check the "Use Tree Node Icon" on the DataWindow, and then specify the icons you want to use for each band in the "Expanded Tree Node Icon File" and "Collapsed Tree Note Icon File" for each group band (see Figure 4) or as the "Tree Node Icon File" on the detail band. The display of lines between the child elements are controlled by the "Connect Leaf Nodes" property. If the "Show Lines" option is turned off, no lines will show, including both the lines between child elements and the lines from the root to the first level items. The "Expand to Level by Default" shows how far down the TreeView the items are already expanded when the DataWindow is first retrieved. The "Indent Value" determines how far the icon is from the +/- characters and the "State Icon Align Mode" value.

There are a couple of items to note about the TreeView presentation style. A native TreeView control allows only a single text label for the nodes. With the TreeView DataWindow presentation style, you can provide many columns of detail information, each with its own edit mask, and each of which the user can update. And, like most other DataWindow presentation styles, the TreeView DataWindow is updateable!

The Grid form of the TreeView presentation style (the one show here) also allows for column headers and column resize and movement - much like the standard Grid DataWindow presentation style. In a way, it's like a cross between a TreeView and a ListView. The non-grid version also allows for column headers, but column resizing and movement is not permitted (more like a tabular DataWindow presentation style). The non-grid version is a bit better if you want to display multiple columns of information in a non-detail band because it won't attempt to force the columns to fit the confines of the detail column layout. However, as with group DataWindows, you can't set a tab order in a non-detail band of the DataWindow. Therefore, the data in any band other than the detail band is not directly editable by the user. As with a group DataWindow, there is a header and trailer band for each level, a header and footer band for the entire DataWindow, as well as a footer band.

It's hard to find a native control to compare the new TreeView presentation style with. It offers a significant functional capability over the Treeview WinForm class. The TreeView presentation style allows for multiple columns of data for each node. It also allows for editing of the data and various editing masks that can be applied to the data. In addition, the TreeView presentation style is also much easier to populate. A System.Windows.Forms.Treeview requires the developer to manually loop through the data to be displayed, creating a System.Windows.Forms.TreeNode object and adding it to the Nodes collection property. The grid layout of the TreeView presentation style DataWindow is somewhat similar to the System.Windows.Form.DataGridView class. However, unlike its predecessor the DataGrid, the DataGridView is not capable of displaying hierarchical data.

The DataWindowControl class has been augmented with one new property (which is really a class, so it's more like a collection of properties) (see Table 1)as well as several new methods and events to support the new presentation style (see Tables 3 and 4).

Conclusion
The TreeView presentation style provides a new powerful way of presenting and maintaining data that is unrivaled by any other native controls in the .NET Framework. Currently, the new presentation style is not supported in the WebDataWindowControl or for use with the .NET Compact Framework (mobile devices). In addition, the current implementation requires the retrieval of all data on the initial load, rather than delaying the loading of child data until the child is expanded. For a large data set, the latter method of operation could be a real advantage.

About Bruce Armstrong
Bruce Armstrong is a development lead with Integrated Data Services (www.get-integrated.com). A charter member of TeamSybase, he has been using PowerBuilder since version 1.0.B. He was a contributing author to SYS-CON's PowerBuilder 4.0 Secrets of the Masters and the editor of SAMs' PowerBuilder 9: Advanced Client/Server Development.

In order to post a comment you need to be registered and logged in.

Register | Sign-in

Reader Feedback: Page 1 of 1

One of the first things you'll notice when you open up the File->New->DataWindow dialog in DataWindow Designer 2.0 is the new TreeView DataWindow presentation style (see Figure 1). Once you've double-clicked on that, you'll see the same series of dialogs that you're already familiar with from the other presentation styles in which you select the data source, the tables to use, the columns in the tables, etc.


Your Feedback
PBDJ News Desk wrote: One of the first things you'll notice when you open up the File->New->DataWindow dialog in DataWindow Designer 2.0 is the new TreeView DataWindow presentation style (see Figure 1). Once you've double-clicked on that, you'll see the same series of dialogs that you're already familiar with from the other presentation styles in which you select the data source, the tables to use, the columns in the tables, etc.
Enterprise Open Source Magazine Latest Stories . . .
Apache Deltacloud, the Red Hat-contributed ReSTful API that abstracts differences between clouds so services on any cloud can be managed – provided of course there’s a driver – has graduated from the Apache Foundation’s incubator and is now a full-fledged Top-Level Project (TLP). The...
With Cloud Expo 2012 New York (10th Cloud Expo) just four months away, what better time to start introducing you in greater detail to the distinguished individuals in our incredible Speaker Faculty for the technical and strategy sessions at the conference... We have technical and st...
AMD said late Tuesday that its chief sales officer Emilio Ghilardi had left the company and that CEO and president Rory Read is going to do his job while a replacement is sought. AMD didn’t say why Ghilardi left but it’s assumed Read wants his own people. Read is relatively new to th...
During the lifespan of M3 (Monitis Monitor Manager) there has always been something lacking – timers. M3 execution procedure was outlined in this previous article. The execution mentioned in the latter was a one-time-execution, whereas server monitoring requires periodic invocati...
Red Hat is putting its bought-in Gluster scale-out NAS storage technology, acquired in October, on the Amazon cloud. It’s styled Red Hat Virtual Storage Appliance for Amazon Web Services and other clouds are supposed to follow in short order.
A new episode of the screencast series is now available at the OpenNebula YouTube Channel. This screencast demonstrates the new easily-customizable self-service portal for cloud consumers. Its aim is to offer a simplified access to shared infrastructure for non-IT end users. The scree...
Subscribe to the World's Most Powerful Newsletters
Subscribe to Our Rss Feeds & Get Your SYS-CON News Live!
Click to Add our RSS Feeds to the Service of Your Choice:
Google Reader or Homepage Add to My Yahoo! Subscribe with Bloglines Subscribe in NewsGator Online
myFeedster Add to My AOL Subscribe in Rojo Add 'Hugg' to Newsburst from CNET News.com Kinja Digest View Additional SYS-CON Feeds
Publish Your Article! Please send it to editorial(at)sys-con.com!

Advertise on this site! Contact advertising(at)sys-con.com! 201 802-3021


SYS-CON Featured Whitepapers
ADS BY GOOGLE