How to use DataWindow objects

Before you can use a DataWindow object, you need to build the object. To do that you can go to the DataWindow painter, which lets you create and edit DataWindow objects.

This section describes the overall process for creating and using DataWindow objects. For more information about using DataWindow objects in different kinds of applications and writing code that interacts with DataWindow objects, see the Resource Guide.

StepsTo use DataWindow objects in an application:

  1. Create the DataWindow object using one of the DataWindow wizards on the DataWindow tab page of the New dialog box.

    The wizard helps you define the data source, presentation style, and other basic properties of the object, and the DataWindow object displays in the DataWindow painter. In this painter, you define additional properties for the DataWindow object, such as display formats, validation rules, and sorting and filtering criteria.

    For more information about creating a DataWindow object, see “Building a DataWindow object”.

  2. Place a DataWindow control in a window or user object.

    It is through this control that your application communicates with the DataWindow object you created in the DataWindow painter.

  3. Associate the DataWindow control with the DataWindow object.

  4. Set properties and write scripts in the Window painter to manipulate the DataWindow control and its contents.

    For example, you use the PowerScript Retrieve function to retrieve data into the DataWindow control.

    You can write scripts for the DataWindow control to deal with error handling, sharing data between DataWindow controls, and so on.