RowFocusChanged – PB Docs 150

RowFocusChanged event

Description

Occurs when the current row changes in the DataWindow.

PowerBuilder event information

Event ID: pbm_dwnrowchange

Argument

Description

currentrow

Long by value. The number of the row
that has just become current.

Web DataWindow client control event information

Event name: RowFocusChanged

Argument

Description

newRow

Number. The number of the row that has
just become current.

Web ActiveX event information

Event name: beforeRowFocusChange

Argument

Description

CurrentRow

Number. The number of the row that has
just become current.

Return Values

There are no special outcomes for this event. The only code
is:

  • 0 Continue processing

Usage

The SetRow method, as well as user actions,
can trigger the RowFocusChanged and ItemFocusChanged events.

In a read-only DataWindow, when you click on any column that
is not in the current row, the RowFocusChanging and RowFocusChanged
events fire, but the current column is not changed—the
current column remains at 0, since no column can have focus. DataWindows
are read-only if updates are not allowed, all tab orders are set
to 0, or all tab columns are protected.

If, however, focus is on an editable column in an updatable
DataWindow (a DataWindow that has one or more editable columns),
the row focus events do not fire when you click on a protected column
or on a column whose tab order is 0. The focus remains on the current,
editable column.

If focus moves off an editable column in an updatable DataWindow,
the DataWindow switches to read-only mode. This can happen when
the last row in the DataWindow does not have an editable column.
In this case, tabbing off the last editable column causes the row
focus to move to the row following the row with the last editable
column. The DataWindow then remains in read-only mode until focus
is given to an editable column.

When you use the ScrollToRow method to
change focus, the RowFocusChanging event is triggered before the
scroll occurs, and the RowFocusChanged event is triggered after
the scroll occurs.

Examples

This example displays the current row number and
the total number of rows in a SingleLineEdit:

See Also


Document get from Powerbuilder help
Thank you for watching.
Was this article helpful?
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x