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 Working with DataWindows in Users Guide.
Obsolete functions
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 its purpose for |
|
|
String |
A label that briefly describes the control, such as |
|
|
AccessibleRole (enumerated) |
Describes what kind of user interface element the |
|
|
Boolean |
Specifies whether the control has a border. Values TRUE — Control has a border. FALSE |
|
|
BorderStyle (enumerated) |
Specifies the border style of the control. Values StyleBox! StyleLowered! StyleRaised! StyleShadowBox! |
|
|
Boolean |
Specifies whether PowerBuilder moves the control to |
|
|
ClassDefinition |
PowerObject |
An object of type PowerObject containing |
|
Boolean |
Specifies whether the Control Menu box displays in TRUE — Control FALSE — |
|
|
String |
Specifies the name of the DataWindow object |
|
|
Boolean |
Specifies whether PowerBuilder puts the control TRUE — When the control is clicked, the FALSE — When |
|
|
String |
Specifies the name of the stock icon or the file When the user drags the control, the |
|
|
Boolean |
Specifies whether the control is enabled (can be TRUE — Control is FALSE — Control is not |
|
|
Integer |
Specifies the height of the DataWindow control, in |
|
|
Boolean |
Specifies whether a horizontal scroll bar displays TRUE — Horizontal scroll bar is FALSE — Horizontal scroll bar is not |
|
|
Boolean |
Specifies whether the split bar displays in the TRUE — Split bar is FALSE — Split bar is not |
|
|
String |
Specifies the name of the ICO file that contains |
|
|
Boolean |
Scrolls the rows in the DataWindow control while |
|
|
Boolean |
Specifies whether a Maximize Box displays in the TRUE — FALSE — Maximize Box does |
|
|
Boolean |
Specifies whether a Minimize Box displays in the TRUE — FALSE — Minimize Box does |
|
|
Object |
DWObject |
Used for the direct manipulation of objects within |
|
Boolean |
Specifies whether the DataWindow control is TRUE — DataWindow is FALSE — DataWindow is not |
|
|
Boolean |
Specifies that characters should be displayed in TRUE — Characters display in right-to-left FALSE — Characters display in left-to-right |
|
|
Integer |
Specifies the tab value of the DataWindow control |
|
|
String |
Specifies the tag value assigned to the DataWindow |
|
|
String |
Specifies the text that displays in the DataWindow |
|
|
Boolean |
Specifies whether a title bar displays in the TRUE — FALSE — No title |
|
|
Boolean |
Specifies whether the DataWindow control is TRUE — Control is FALSE — Control is not |
|
|
Boolean |
Specifies whether a vertical scroll bar displays in TRUE — Vertical scroll bar is FALSE — Vertical scroll bar is not |
|
|
Integer |
Specifies the width of the DataWindow control, in |
|
|
Integer |
Specifies the X position (the distance from the |
|
|
Integer |
Specifies the Y position (the distance from the top |
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 occurs |
|
|
When the user clicks between fields in the Return codes: 0 – 1 – Stop |
|
|
When a node in a TreeView DataWindow has |
|
|
Before a node in a TreeView DataWindow |
|
|
Immediately before the Open event occurs in the |
|
|
When a database error occurs in the DataWindow |
|
|
Immediately after the Close event occurs in the |
|
|
When the user double-clicks between fields in the For a RichText presentation |
|
|
When a dragged control is dropped on the DataWindow |
|
|
When a dragged control enters the DataWindow |
|
|
When a dragged control leaves the DataWindow |
|
|
When a dragged control is within the DataWindow |
|
|
When a user types in an edit control in the |
|
|
When an error is found in a data or property |
|
|
When a node in a TreeView DataWindow has |
|
|
Before a node in a TreeView DataWindow |
|
|
Just before the DataWindow control receives focus |
|
|
When the user presses the F1 key or drags the |
|
|
When a field in the DataWindow has been modified Return codes: 0 1 – Reject the 2 – |
|
|
When a field has been modified, the field loses Return 0 – (Default) Reject the data value and show 1 – Reject the data value with 2 – Accept the data 3 – Reject the data value but allow focus to If the Return code is 0 or 1 (rejects the |
|
|
When the current item in the control |
|
|
When the DataWindow control loses focus (becomes |
|
|
When a Windows message occurs that is not a |
|
|
When the printing of the DataWindow |
|
|
Before each page of the DataWindow is formatted for Return codes: 0 – Do not skip 1 – Skip a page. |
|
|
When the printing of the DataWindow |
|
|
When the right mouse button is pressed on the For a RichText presentation style |
|
|
When the user or a script resizes a DataWindow |
|
|
When the retrieval for the DataWindow is |
|
|
After a row has been retrieved. Return 0 – (Default) Continue. 1 – Stop |
|
|
When the retrieval for the DataWindow is about to Return codes: 0 – (Default) 1 – Do not perform the 2 – Do not reset the rows and buffers |
|
|
When the current row changes in the |
|
|
When the current row is about the change in the |
|
|
When the user scrolls right or left in the |
|
|
When the user scrolls up or down in the DataWindow |
|
|
After a Retrieve, Update, or ReselectRow function The following return codes specify the 0 – (Default) 1 – Stop. 2 – Skip this |
|
|
When all the updates from the DataWindow to the |
|
|
After an Update function call and just before Return codes: 0 – (Default) 1 – Do not perform the |
|
|
Occurs when an error is returned for a DataWindow |
Functions
|
DataWindow function |
Datatype returned |
Description |
|---|---|---|
|
Integer |
Applies the contents of the DataWindow control’s |
|
|
Boolean |
Specifies whether the last edit can be undone with TRUE — Last edit can be FALSE — Last edit cannot be |
|
|
Integer |
Returns the number of categories in the specified |
|
|
String |
Returns the name of the specified category in the |
|
|
String |
Returns the name assigned to the DataWindow |
|
|
Integer |
Clears (deletes) the selected text in the edit For a RichText |
|
|
Integer |
Deletes all items from the value list associated |
|
|
Integer |
Copies the specified graph in the DataWindow |
|
|
Integer |
Copies the selected text in the edit control over For a RichText presentation style |
|
|
String |
Returns the selected text, pictures, and input |
|
|
Integer |
Creates a DataWindow object using the specified |
|
|
Integer |
Displays the Crosstab Definition dialog box so the |
|
|
Integer |
Cuts the selected text from the edit control over For a RichText presentation style |
|
|
Long |
Returns the number of data points in the specified |
|
|
Integer |
Cancels a database retrieval in |
|
|
Long |
Returns the error code (number) generated by a Obsolete DBErrorCode is an obsolete |
|
|
String |
Returns a string containing the text of the error Obsolete DBErrorMessage is an obsolete |
|
|
Long |
Returns the number of rows that have been deleted |
|
|
Integer |
Deletes the specified row from the DataWindow |
|
|
String |
Returns requested information about the structure |
|
|
Integer |
Starts or ends the dragging of the DataWindow |
|
|
String |
Exports data from the DataWindow control, DataStore |
|
|
String |
Exports a data row from the DataWindow control, |
|
|
Integer |
Displays specific rows of the DataWindow control |
|
|
Integer |
Returns the number of rows that are not visible |
|
|
Long |
Syntax 1: Finds the next row in a DataWindow Syntax 2: For Rich Text presentation |
|
|
Integer |
Returns the number of the specified category in the |
|
|
Long |
Searches starting at a specified row for the first |
|
|
Integer |
Finds the next occurrence of text in the control This function applies only to |
|
|
Integer |
Identifies the required columns that the user has |
|
|
Integer |
Returns the number of the specified series in the |
|
|
Integer |
Creates an HTML Form element containing columns for |
|
|
Long |
Returns an EAServer result set from a PowerBuilder Obsolete GenerateResultSet is an obsolete |
|
|
String |
Returns the string containing the band in which the |
|
|
Border (enumerated) |
Returns a Border enumerated datatype indicating the Box! Lowered! NoBorder! Raised! ResizeBorder! ShadowBox! Underline! |
|
|
Long |
Retrieves changes made to a DataWindow into a blob. |
|
|
Integer |
Stores in the specified variable the name of the |
|
|
Integer |
Returns the number of the column in the DataWindow |
|
|
Long |
Returns the number of the row in the DataWindow |
|
|
Integer |
Returns the number of the current column in the |
|
|
String |
Returns the name of the current column in the |
|
|
Integer |
Creates a reference to a context-specific instance |
|
|
Double |
Returns the value of the specified data in the |
|
|
Integer |
Reports the percentage that a pie slice is exploded |
|
|
Integer |
Determines whether the data at a given data point |
|
|
Integer |
Finds out the appearance of a data point in a |
|
|
Integer |
Obtains the transparency percentage of a series in |
|
|
Integer |
Returns the value of the specified data in the |
|
|
String |
Returns the format used for display in the |
|
|
Long |
Retrieves the complete state of a DataWindow into a |
|
|
Date |
Returns the date data in the specified row and |
|
|
DateTime |
Returns the datetime data in the specified row and |
|
|
Decimal |
Returns the decimal data in the specified row and |
|
|
Double |
Returns the numeric data in the specified row and |
|
|
dwItemStatus (enumerated) |
Returns the status of the item at the specified row DataModified! New! NewModified! NotModified! |
|
|
String |
Returns the string data in the specified row and |
|
|
Time |
Returns the time data in the specified row and |
|
|
String |
Obtains the message text generated by a crosstab Obsolete GetMessageText is an obsolete |
|
|
Long |
Returns the number of the first row that was |
|
|
String |
Returns the string containing the name of the |
|
|
PowerObject |
Returns a reference to the name of the parent |
|
|
Long |
Returns an integer containing the number of the |
|
|
Long |
Gets the row number of a row in a DataWindow |
|
|
Long |
Gets the unique row identifier of a row in a |
|
|
Integer |
Returns the number of the first selected row after |
|
|
Integer |
Obtains the series labelling for a DirectX 3D |
|
|
Integer |
Finds out the appearance of a series in a graph. |
|
|
Integer |
Obtains the transparency percentage of a series in |
|
|
String |
Returns the current SQL statement the DataWindow Obsolete GetSQLPreview is an obsolete |
|
|
String |
Returns the current SELECT statement for the |
|
|
Long |
Retrieves the current status of the internal state |
|
|
String |
Returns the text in the edit control over the |
|
|
Integer |
Returns the values in the DataWindow Transaction |
|
|
Integer |
Stores the number of the row that will be updated Obsolete GetUpdateStatus is an obsolete |
|
|
String |
Returns the validation rule used in the specified |
|
|
String |
Returns the specified item in the value list for |
|
|
Integer |
Recalculates the breaks in the groups in the |
|
|
Integer |
Makes the control invisible. |
|
|
Long |
Copies data from the clipboard to the DataWindow |
|
|
Long |
Copies data from a file to the DataWindow |
|
|
Long |
Inserts data from a JSON string into the DataWindow |
|
|
Long |
Inserts data from a JSON string into the DataWindow |
|
|
Long |
Inserts a data row from a JSON string into a |
|
|
Long |
Copies data from a string to the DataWindow |
|
|
Integer |
Inserts a rich text format or plain text file into
This function applies only to DataWindow |
|
|
Long |
Inserts a new initialized row before the specified |
|
|
Boolean |
Returns true if the specified row in the DataWindow |
|
|
Integer |
Determines the number of lines in an edit control |
|
|
Long |
Returns the number of rows that have been modified |
|
|
String |
Uses the specification contained in a string to |
|
|
Integer |
Moves the specified DataWindow control to a |
|
|
grObjectType |
Returns the number of the series the pointer is |
|
|
Integer |
Activates OLE for the OLE object in the specified |
|
|
Integer |
Inserts the contents of the clipboard into the edit |
|
|
Long |
Pastes rich text data from a string into a |
|
|
Integer |
Returns the distance of the pointer from the left |
|
|
Integer |
Returns the distance of the pointer from the top of |
|
|
Integer |
Syntax 1: Reports the insertion point’s position in Syntax 2: Reports the line and |
|
|
Boolean |
Adds an event to the end of the message queue for |
|
|
Integer |
Sends the content of the DataWindow control to the |
|
|
Integer |
Cancels the print job and deletes the spool file This function has two syntaxes. Use Syntax 1 |
|
|
Integer |
Replaces the selected text in the edit control with |
|
|
Integer |
Accesses the database to reselect all columns that |
|
|
Integer |
Clears all the data from a DataWindow |
|
|
Integer |
Deletes the data, the categories, or the series |
|
|
Integer |
Resets the color of a data point to the color |
|
|
Integer |
Stops the DataWindow control from using a |
|
|
Integer |
Resets the update flags for the DataWindow |
|
|
Integer |
Changes the width and height of the DataWindow |
|
|
Long |
Retrieves rows from the database for the DataWindow |
|
|
Long |
Returns the number of rows currently available in |
|
|
Integer |
Copies a range of rows from one DataWindow control |
|
|
Integer |
Discards a range of rows. The rows cannot be |
|
|
Integer |
Clears a range of rows from a DataWindow control |
|
|
Integer |
Saves the data represented in the specified graph |
|
|
Integer |
Saves the content of the DataWindow control to the |
|
|
Long |
Saves the content of a DataWindow into a standard |
|
|
Integer |
Saves the PDF file into a blob variable when you |
|
|
Integer |
Scrolls the edit control of a DataWindow control in |
|
|
Long |
Syntax 1: Scrolls forward by the number of rows Syntax 2: Scrolls to the next page of the |
|
|
Long |
Scrolls the DataWindow control to the next row. |
|
|
Long |
Syntax 1: Scrolls backward by the number of rows Syntax 2: Scrolls to the prior page of the |
|
|
Long |
Scrolls to the previous row. The ScrollPriorRow |
|
|
Integer |
Causes the control to scroll to the specified row. |
|
|
Integer |
Reports the total number of characters and spaces |
|
|
Integer |
Reports the line number in the edit control over |
|
|
Integer |
Reports the starting position in the edit control |
|
|
String |
Reports what text (if any) is selected in the edit |
|
|
Integer |
Selects or deselects the specified row in the |
|
|
Integer |
Syntax 1: Selects text in the edit control of a Syntax 2: |
|
|
Integer |
Selects all the content of a DataWindow control |
|
|
Integer |
Selects the line containing the insertion point in |
|
|
Integer |
Selects the word containing the insertion point in |
|
|
Integer |
Returns the number of series in the specified graph |
|
|
String |
Returns the name of the specified series in the |
|
|
Integer |
Defines the action a DataWindow control takes Obsolete SetActionCode is an obsolete |
|
|
Integer |
Sets the border style of the specified column in |
|
|
Long |
Applies changes captured with GetChanges to a |
|
|
Integer |
Makes the specified column the current column in |
|
|
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 Syntax 2: Sets the line style and width for Syntax 3: Sets the fill pattern or |
|
|
Integer |
Sets the transparency percentage for a data point |
|
|
Integer |
Sets the height of each row in a specified |
|
|
Integer |
Defines the filter criteria for the DataWindow |
|
|
Integer |
Sets focus to the DataWindow |
|
|
Integer |
Sets the display format for the specified column of |
|
|
Long |
Applies the contents of a DataWindow blob retrieved |
|
|
Integer |
Accepts action and context information about user Obsolete SetHTMLAction is an obsolete |
|
|
Integer |
Sets the value of the specified row and column of |
|
|
Integer |
Sets the status of a row in a specified column of |
|
|
Integer |
Syntax 1: Specifies whether the DataWindow control Syntax 2: Moves an object within the |
|
|
Integer |
Controls automatic redrawing of the DataWindow |
|
|
Integer |
Makes the specified row the current row in the |
|
|
Integer |
Sets the current row indicator for the DataWindow |
|
|
Integer |
Sets the series label for a DirectX 3D |
|
|
Integer |
For the specified series in the specified graph in Syntax 1: Sets the series Syntax 2: Sets the linestyle and Syntax 3: Sets the fill pattern or symbol for Syntax 4: Specifies that |
|
|
Integer |
Defines the sort criteria for the DataWindow |
|
|
Integer |
Sets the transparency percentage of a series in a |
|
|
Integer |
Sets the current SQL statement for the DataWindow |
|
|
Integer |
Changes the current SELECT statement for the |
|
|
Integer |
Changes the tab value of the specified column in |
|
|
Integer |
Replaces the text in the edit control at the |
|
|
Integer |
Sets values in the DataWindow control’s internal |
|
|
Integer |
Sets the Transaction object for the DataWindow |
|
|
Integer |
Changes the validation rule used for the specified |
|
|
Integer |
Sets the value of the specified item in the value |
|
|
Integer |
Causes a DataWindow control to use a |
|
|
Integer |
Shares data between a primary DataWindow control |
|
|
Integer |
Turns off sharing for the DataWindow control. If |
|
|
Integer |
Makes the DataWindow control |
|
|
Integer |
In a RichText presentation style DataWindow |
|
|
Integer |
Sorts the rows of the DataWindow control based on |
|
|
String |
Reports information about the edit control over the |
|
|
Integer |
Triggers a specified event in the DataWindow |
|
|
Object |
Returns the type of the control. |
|
|
Integer |
Cancels the last edit in the edit control over the |
|
|
Integer |
Sends to the database all inserts, deletes, and |