DataWindow control
You place DataWindow controls in
a window or user object and then specify the DataWindow object you
want to use within them to display and manipulate data in the window.
A DataWindow object allows users to display, manipulate, and
update database or other information. You build DataWindow objects
in the DataWindow painter.
For information about DataWindow objects,
see the PowerBuilder Users Guide.

Several DataWindow control functions are described as obsolete,
which means that although the function operates as usual in this
release, it will be removed in a future release. You should replace
all use of these functions as soon as possible.
Properties
DataWindow property |
Datatype |
Description |
---|---|---|
String |
A description of the control and/or |
|
String |
A label that briefly describes the control, |
|
AccessibleRole (enumerated) |
Describes what kind of user interface |
|
Boolean |
Specifies whether the control has a border.
|
|
BorderStyle (enumerated) |
Specifies the border style of the control.
|
|
Boolean |
Specifies whether PowerBuilder moves |
|
ClassDefinition |
PowerObject |
An object of type PowerObject containing |
Boolean |
Specifies whether the Control Menu box
|
|
String |
Specifies the name of the DataWindow |
|
Boolean |
Specifies whether PowerBuilder puts the
|
|
String |
Specifies the name of the stock icon When the user drags the control, the icon displays when the control |
|
Boolean |
Specifies whether the control is enabled
|
|
Integer |
Specifies the height of the DataWindow |
|
Boolean |
Specifies whether a horizontal scroll
|
|
Boolean |
Specifies whether the split bar displays
|
|
String |
Specifies the name of the ICO file that |
|
Boolean |
Scrolls the rows in the DataWindow control |
|
Boolean |
Specifies whether a Maximize Box displays
|
|
Boolean |
Specifies whether a Minimize Box displays
|
|
Object |
DWObject |
Used for the direct manipulation of objects |
Boolean |
Specifies whether the DataWindow control
|
|
Boolean |
Specifies that characters should be displayed
|
|
Integer |
Specifies the tab value of the DataWindow |
|
String |
Specifies the tag value assigned to the |
|
String |
Specifies the text that displays in the |
|
Boolean |
Specifies whether a title bar displays
|
|
Boolean |
Specifies whether the DataWindow control
|
|
Boolean |
Specifies whether a vertical scroll bar
|
|
Integer |
Specifies the width of the DataWindow |
|
Integer |
Specifies the X position (the distance |
|
Integer |
Specifies the Y position (the distance |
Events
Some but not all DataWindow events have return codes that
you can use to determine what action is taken after the event occurs.
You set the return codes in a RETURN statement
in the event script.
DataWindow event |
Occurs |
---|---|
When the user clicks a button. |
|
When the user clicks a button. This event |
|
When the user clicks between fields in Return codes:
|
|
When a node in a TreeView DataWindow |
|
Before a node in a TreeView DataWindow |
|
Immediately before the Open event occurs |
|
When a database error occurs in the DataWindow |
|
Immediately after the Close event occurs |
|
When the user double-clicks between fields For a RichText presentation style DataWindow, when the user |
|
When a dragged control is dropped on |
|
When a dragged control enters the DataWindow |
|
When a dragged control leaves the DataWindow |
|
When a dragged control is within the |
|
When a user types in an edit control |
|
When an error is found in a data or property |
|
When a node in a TreeView DataWindow |
|
Before a node in a TreeView DataWindow |
|
Just before the DataWindow control receives |
|
When the user presses the F1 key or drags |
|
When a field in the DataWindow has been Return codes:
|
|
When a field has been modified, the field Return codes:
If the Return code is 0 or 1 (rejects the data), the field |
|
When the current item in the control |
|
When the DataWindow control loses focus |
|
When a Windows message occurs that is |
|
When the printing of the DataWindow ends. |
|
Before each page of the DataWindow is Return codes:
|
|
When the printing of the DataWindow starts. |
|
When the right mouse button is pressed For a RichText presentation style DataWindow, if PopUp Menu |
|
When the user or a script resizes a DataWindow |
|
When the retrieval for the DataWindow |
|
After a row has been retrieved. Return codes:
|
|
When the retrieval for the DataWindow Return codes:
|
|
When the current row changes in the DataWindow. |
|
When the current row is about the change |
|
When the user scrolls right or left in |
|
When the user scrolls up or down in the |
|
After a Retrieve, Update, The following return codes specify the action that takes place
|
|
When all the updates from the DataWindow |
|
After an Update function Return codes:
|
|
Occurs when an error is returned for |
Functions
DataWindow function |
Datatype returned |
Description |
---|---|---|
Integer |
Applies the contents of the DataWindow |
|
Boolean |
Specifies whether the last edit can be
|
|
Integer |
Returns the number of categories in the |
|
String |
Returns the name of the specified category |
|
String |
Returns the name assigned to the DataWindow |
|
Integer |
Clears (deletes) the selected text in For a RichText presentation style DataWindow, clears the selected text |
|
Integer |
Deletes all items from the value list |
|
Integer |
Copies the specified graph in the DataWindow |
|
Integer |
Copies the selected text in the edit For a RichText presentation style DataWindow, copies the selected text |
|
String |
Returns the selected text, pictures, |
|
Integer |
Creates a DataWindow object using the |
|
Integer |
Displays the Crosstab Definition dialog |
|
Integer |
Cuts the selected text from the edit For a RichText presentation style DataWindow, cuts the selected text |
|
Long |
Returns the number of data points in |
|
Integer |
Cancels a database retrieval in progress. |
|
Long |
Returns the error code (number) generated Obsolete function DBErrorCode is an obsolete function and will be discontinued |
|
String |
Returns a string containing the text Obsolete function DBErrorMessage is an obsolete function and will be discontinued |
|
Long |
Returns the number of rows that have |
|
Integer |
Deletes the specified row from the DataWindow |
|
String |
Returns requested information about the |
|
Integer |
Starts or ends the dragging of the DataWindow |
|
Integer |
Displays specific rows of the DataWindow |
|
Integer |
Returns the number of rows that are not |
|
Long |
Syntax 1: Finds the next row in a DataWindow Syntax 2: For Rich Text presentation style Data Windows, finds |
|
Integer |
Returns the number of the specified category |
|
Long |
Searches starting at a specified row |
|
Integer |
Finds the next occurrence of text in This function applies only to DataWindow controls whose content has |
|
Integer |
Identifies the required columns that |
|
Integer |
Returns the number of the specified series |
|
Integer |
Creates an HTML Form element containing |
|
Long |
Returns an EAServer result |
|
String |
Returns the string containing the band |
|
Border (enumerated) |
Returns a Border enumerated datatype
|
|
Long |
Retrieves changes made to a DataWindow |
|
Integer |
Stores in the specified variable the |
|
Integer |
Returns the number of the column in the |
|
Long |
Returns the number of the row in the |
|
Integer |
Returns the number of the current column |
|
String |
Returns the name of the current column |
|
Integer |
Creates a reference to a context-specific |
|
Double |
Returns the value of the specified data |
|
Integer |
Reports the percentage that a pie slice |
|
Integer |
Determines whether the data at a given |
|
Integer |
Finds out the appearance of a data point |
|
Integer |
Obtains the transparency percentage of |
|
Integer |
Returns the value of the specified data |
|
String |
Returns the format used for display in |
|
Long |
Retrieves the complete state of a DataWindow |
|
Date |
Returns the date data in the specified |
|
DateTime |
Returns the datetime data in the specified |
|
Decimal |
Returns the decimal data in the specified |
|
Double |
Returns the numeric data in the specified |
|
dwItemStatus (enumerated) |
Returns the status of the item at the
|
|
String |
Returns the string data in the specified |
|
Time |
Returns the time data in the specified |
|
String |
Obtains the message text generated by Obsolete function GetMessageText is an obsolete function |
|
Long |
Returns the number of the first row that |
|
String |
Returns the string containing the name |
|
PowerObject |
Returns a reference to the name of the |
|
Long |
Returns an integer containing the number |
|
Long |
Gets the row number of a row in a DataWindow |
|
Long |
Gets the unique row identifier of a row |
|
Integer |
Returns the number of the first selected |
|
Integer |
Obtains the series labelling for a DirectX |
|
Integer |
Finds out the appearance of a series |
|
Integer |
Obtains the transparency percentage of |
|
String |
Returns the current SQL statement Obsolete function GetSQLPreview is an obsolete function and will |
|
String |
Returns the current SELECT statement |
|
Long |
Retrieves the current status of the internal |
|
String |
Returns the text in the edit control |
|
Integer |
Returns the values in the DataWindow |
|
Integer |
Stores the number of the row that will Obsolete function GetUpdateStatus is an obsolete function |
|
String |
Returns the validation rule used in the |
|
String |
Returns the specified item in the value |
|
Integer |
Recalculates the breaks in the groups |
|
Integer |
Makes the control invisible. |
|
Long |
Copies data from the clipboard to the |
|
Long |
Copies data from a file to the DataWindow |
|
Long |
Copies data from a string to the DataWindow |
|
Integer |
Inserts a rich text format or plain text
This function applies only to DataWindow controls whose content has |
|
Long |
Inserts a new initialized row before |
|
Boolean |
Returns true if the |
|
Integer |
Determines the number of lines in an |
|
Long |
Returns the number of rows that have |
|
String |
Uses the specification contained in a |
|
Integer |
Moves the specified DataWindow control |
|
grObjectType |
Returns the number of the series the |
|
Integer |
Activates OLE for the OLE object in the |
|
Integer |
Inserts the contents of the clipboard |
|
Long |
Pastes rich text data from a string into |
|
Integer |
Returns the distance of the pointer from |
|
Integer |
Returns the distance of the pointer from |
|
Integer |
Syntax 1: Reports the insertion point’s Syntax 2: Reports the line and column position of the insertion point |
|
Boolean |
Adds an event to the end of the message |
|
Integer |
Sends the content of the DataWindow control |
|
Integer |
Cancels the print job and deletes the This function has two syntaxes. Use Syntax 1 when Syntax 1 |
|
Integer |
Replaces the selected text in the edit |
|
Integer |
Accesses the database to reselect all |
|
Integer |
Clears all the data from a DataWindow |
|
Integer |
Deletes the data, the categories, or |
|
Integer |
Resets the color of a data point to the |
|
Integer |
Stops the DataWindow control from using |
|
Integer |
Resets the update flags for the DataWindow |
|
Integer |
Changes the width and height of the DataWindow |
|
Long |
Retrieves rows from the database for |
|
Long |
Returns the number of rows currently |
|
Integer |
Copies a range of rows from one DataWindow |
|
Integer |
Discards a range of rows. The rows cannot |
|
Integer |
Clears a range of rows from a DataWindow |
|
Integer |
Saves the data represented in the specified |
|
Integer |
Saves the content of the DataWindow control |
|
Long |
Saves the content of a DataWindow into |
|
Integer |
Scrolls the edit control of a DataWindow |
|
Long |
Syntax 1: Scrolls forward by the number Syntax 2: Scrolls to the next page of the document in a DataWindow |
|
Long |
Scrolls the DataWindow control to the |
|
Long |
Syntax 1: Scrolls backward by the number Syntax 2: Scrolls to the prior page of the document in a DataWindow |
|
Long |
Scrolls to the previous row. The ScrollPriorRow function |
|
Integer |
Causes the control to scroll to the specified |
|
Integer |
Reports the total number of characters |
|
Integer |
Reports the line number in the edit control |
|
Integer |
Reports the starting position in the |
|
String |
Reports what text (if any) is selected |
|
Integer |
Selects or deselects the specified row |
|
Integer |
Syntax 1: Selects text in the edit control Syntax 2: Selects text beginning and ending at the specified |
|
Integer |
Selects all the content of a DataWindow |
|
Integer |
Selects the line containing the insertion |
|
Integer |
Selects the word containing the insertion |
|
Integer |
Returns the number of series in the specified |
|
String |
Returns the name of the specified series |
|
Integer |
Defines the action a DataWindow control Obsolete function SetActionCode is an obsolete function and will |
|
Integer |
Sets the border style of the specified |
|
Long |
Applies changes captured with GetChanges to |
|
Integer |
Makes the specified column the current |
|
Integer |
Explodes a pie slice in a pie graph. |
|
Integer |
Sets the series label for a DirectX 3D |
|
Integer |
For the specified data point in the specified Syntax 1: Sets the data point’s color. Syntax 2: Sets the line style and width for the data point. Syntax 3: Sets the fill pattern or symbol for the data point. |
|
Integer |
Sets the transparency percentage for |
|
Integer |
Sets the height of each row in a specified |
|
Integer |
Defines the filter criteria for the DataWindow |
|
Integer |
Sets focus to the DataWindow control. |
|
Integer |
Sets the display format for the specified |
|
Long |
Applies the contents of a DataWindow |
|
Integer |
Accepts action and context information |
|
Integer |
Sets the value of the specified row and |
|
Integer |
Sets the status of a row in a specified |
|
Integer |
Syntax 1: Specifies whether the DataWindow Syntax 2: Moves an object within the DataWindow to another |
|
Integer |
Controls automatic redrawing of the DataWindow |
|
Integer |
Makes the specified row the current row |
|
Integer |
Sets the current row indicator for the |
|
Integer |
Sets the series label for a DirectX 3D |
|
Integer |
For the specified series in the specified Syntax 1: Sets the series’ color. Syntax 2: Sets the linestyle and width. Syntax 3: Sets the fill pattern or symbol for data markers Syntax 4: Specifies that the series is an overlay. |
|
Integer |
Defines the sort criteria for the DataWindow |
|
Integer |
Sets the transparency percentage of a |
|
Integer |
Sets the current SQL statement |
|
Integer |
Changes the current SELECT statement |
|
Integer |
Changes the tab value of the specified |
|
Integer |
Replaces the text in the edit control |
|
Integer |
Sets values in the DataWindow control’s |
|
Integer |
Sets the Transaction object for the DataWindow |
|
Integer |
Changes the validation rule used for |
|
Integer |
Sets the value of the specified item |
|
Integer |
Causes a DataWindow control to use a |
|
Integer |
Shares data between a primary DataWindow |
|
Integer |
Turns off sharing for the DataWindow |
|
Integer |
Makes the DataWindow control visible. |
|
Integer |
In a RichText presentation style DataWindow |
|
Integer |
Sorts the rows of the DataWindow control |
|
String |
Reports information about the edit control |
|
Integer |
Triggers a specified event in the DataWindow |
|
Object |
Returns the type of the control. |
|
Integer |
Cancels the last edit in the edit control |
|
Integer |
Sends to the database all inserts, deletes, |