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

Continue reading

May 29, 2008 Posted by | DataWindow Control | , , , , , | 1 Comment

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

Continue reading

May 29, 2008 Posted by | DataWindow Control | , , , , , , , , | Leave a comment

Event Sequences


Retrieve()

May 17, 2008 Posted by | DataWindow Control | , , , , , , , , , , , | Leave a comment

RowFocusChanging Event


This fires before a row changes focus

Return codes

1 = stop the row focus form changing

Arguments

CurrrentRow

NewRow

May 17, 2008 Posted by | DataWindow Control | , , , | Leave a comment

Other Event


Mouse Scroll Wheel (other event)

The user can hold down control and then use the mouse scroll wheel to zoom in or out. This can be disabled with the code below. If you want to disable the scroll wheel all together, you would just remove “AND KeyDown(KeyControl!) ” from the code.

// dw's  "other" event
CONSTANT integer LCI_MOUSEWHEEL = 522

IF message.number = LCI_MOUSEWHEEL AND &
    KeyDown (KeyControl!) THEN
    message.processed = TRUE
    RETURN 1
END IF

May 17, 2008 Posted by | DataWindow Control | , , , , , , , | 4 Comments

RetrieveStart Event


How do I append data to a datawindow

In the RetrieveStart event the return code must be 2

Return 2

Return Codes

0 – (Default) Continue.

1 – Do not perform the retrieval.

2 – Do not reset the rows and buffers before retrieving the data from the database.

May 17, 2008 Posted by | DataWindow Control | , , , | Leave a comment

Error Event


When does the Error event fire?

The Error Event occurs at execution time as the result of syntax errors in DataWindow property expressions and DataWindow data expressions. If you refer to a nonexistent object, misspell a property name or reference nonexistent data the Error event fires.

Dw_1.Object.emp_id.Visible=’0’

Continue reading

May 16, 2008 Posted by | DataWindow Control | , , , , , , , , , , | Leave a comment

DBError Event


The DBError event fires in a DataWindow when a database error occurs as a result of an Update( ).

Continue reading

May 16, 2008 Posted by | DataWindow Control | , , , , | 2 Comments

CloseQuery Event


Return 0 to close window, 1 to prevent window from closing

May 16, 2008 Posted by | DataWindow Control | , | Leave a comment