Objects can be added to your DataWindow programmatically via a Modify
statement. In my opinion, the dynamic creation of objects within a DataWindow
has been a highly underused feature.
Dynamically creating (or destroying) objects within a DataWindow has many
advantages such as:
Dynamically changing the content If a printed DataWindow varies in appearance
from its visual presentation
The syntax for creating objects within DataWindows can be daunting; no wonder
it's not used that often. Before I go into more detail, it's important to
know how objects are contained in a DataWindow in the first place. Once you
understand this, you will find that dynamically creating objects is easy.
The Naked DataWindow
Background
It should come as no surprise that a DataWindow is really just a collection
of objects, each with its own properties. When a programmer is creating a
DataWindo... (more)
The DataWindow has been around since the first version of PowerBuilder and is
indeed the reason many shops have chosen PB.
Around for over 10 years, it has remained the most powerful data control in
any language. No other language has anything like it - not even Visual Basic
or Java. If your application requires a complicated presentation layer
containing heavy database transactions, the DataWindow is the control of
choice.
As PowerBuilder versions have progressed, so has the functionality of the
DataWindow; most PowerBuilder programmers are aware of the basic
functionality. Th... (more)
In my early PowerBuilder days, I was very impressed with how easy it was to
create and format DataWindows for either online or printed reports. At its
easiest, a simple print method is required to send a "What you see is what
you get" version of the DataWindow to the printer. Even when the printed
version of a DataWindow is different from the visual one, a simple
ShareData() function would be all that is required.
What took a while, however, was learning how to display and print reports
that either had a master/detail relationship or no relationship at all. In
short, what if I n... (more)
From the beginning, the DataWindow has been a powerful client/server control.
What has set it apart from competing products is its ability to create SQL.
In reality, the DataWindow is a SQL-generating machine. By keeping track of
row and column statuses, the DataWindow is able to generate the correct SQL
statement to UPDATE, DELETE, or INSERT rows into a database. In most
instances, the developer is oblivious to the SQL generation; all that's
needed to unleash all this functionality is to issue a simple update
function. However, DataWindows can take SQL only so far, as their use ... (more)
JBuilder Data Express controls enable JBuilder developers to use prebuilt
objects to provide the user with an interface in which to view and manipulate
data. For the most part, the use of Data Express components simplifies our
task of programming data access functionality into our applets/applications.
One drawback of using these components is that you're restricted to using
only functions and changing properties that are supported by that specific
control. In other words, although JBuilder simplifies your task, you can use
only prewritten functionality.
What if you wanted total... (more)