Schultz’s PowerBuilder Notes

ItemError Event

Return codes

Return Code

Action

0

Reject the data value and display an error message

1

Reject the data value and do not display a message

2

Accept the data value

3

Reject the data value but let the focus change

Read more »

May 29, 2008 Posted by rick130 | DataWindow Control | , , , , , | No Comments Yet

ItemChanged Event

Return codes

Return Code

Action

0

Accept the data value

1

Reject the data value

2

Reject the data value but let the focus change

Read more »

May 29, 2008 Posted by rick130 | DataWindow Control | , , , , , , , , | No Comments Yet

Populating Dropdown DataWindows

When are DDDWs populated automatically?

  • A Retrieve() is issued and the DDDW does not have a result set
  • A row is Inserted

Read more »

May 29, 2008 Posted by rick130 | 2. Datawindows, Drop Down Data Window (DDDW) | , | No Comments Yet

DataWindow Script Techniques

How do I set a property for an entire column?

Modify(“shft_id.visible = 0″)

Modify(“shft_desc.protect = 1″)

Read more »

May 26, 2008 Posted by rick130 | 2. Datawindows, Datawindow PowerScript | , , , , , , , , , , , , , , , , , , , , , , , , , , , | 8 Comments

System Functions

Evaluate( )

The evaluate( ) function is available for use with Describe( ). Evaluate( ) lets you evaluate DataWindow expressions within a script using data in the DataWindow. It has the following syntax:

Read more »

May 26, 2008 Posted by rick130 | Powerscript | , , , , , , , , , , | No Comments Yet

InterDataWindow Communication

RowsCopy

RowsCopy will copy the contents of one datawindow/datastore to another. The RowStatus flags for each row will be NewModified!

Read more »

May 26, 2008 Posted by rick130 | Datawindow PowerScript | , , , , | No Comments Yet

Row Selection

GetSelectedRow(long)

Reports the number of the next highlighted row after a specified row in a DataWindow control or DataStore object. Argument is the row after which you want to search for the next selected row. Specify 0 to begin searching at the first row

Read more »

May 26, 2008 Posted by rick130 | Datawindow PowerScript | , , | No Comments Yet

Dynamic DataWindows

How do I build a DataWindow dynamically?

  1. Build the SQL statement for the DataWindow object as a string and describe he form and presentation style of the DataWindow object
  2. Associate the new DataWindow object with a DataWindow control

Read more »

May 26, 2008 Posted by rick130 | 2. Datawindows | , , , , , , , , , , , | No Comments Yet

Printing a DataWindow

Print Events

  • PrintStart
  • PrintPage
  • PrintEnd

In the PrintPage event, a RETURN 1 will skip the next page to be printed.

Read more »

May 25, 2008 Posted by rick130 | Datawindow PowerScript | , , , , , | No Comments Yet