PFC Guide Titlebar
HomeFAQLinksPFCMAGExtensionsDownloadWhat's NewSearch

Datawindow Row Selection Service FAQ


Table of Contents

  1. What is the purpose of the row selection service?
  2. How do I get the up / down arrows to change the highlighted row?
  3. When rows are selected using the <CTRL> key, of_SelectedCount() returns a wrong result.

What is the purpose of the row selection service

Row selection service provides automatic row highlighting using one of the three styles.

 

Back to Top

How do I get the up / down arrows to change the highlighted row?

Currently the up / down arrows change the current datawindow row. The space bar emulates a mouse click and highlights the row. This makes sense for multiple and extended row selection, but sometimes needs to be overridden for single row selection. In order to change the highlighted row with each arrow key press add:

inv_rowselect.of_rowselect(currentrow)

to the rowfocuschanged event.

Back to Top

When rows are selected using the <CTRL> key, of_SelectedCount() returns a wrong result.

PFC row selection may be initiated from lbuttonup and/or rbottonup events. Both of these events are fired after the clicked event. In this case of_selectedcount() when placed in the clicked event it will always be one selection behind. Posting a user event from the clicked will not resolve this problem. The posted event still executes before the lbuttonup.

The solution is to calculate the selected row count after all the events settle or to post or trigger a user event from all clicked, lbuttonup and rbottonup events:

ue_countselected:

long ll_rows[]
il_selected = inv_rowselect.of_selectedCount(ll_rows)

Access the il_selected instance variable to determine the current row count.

Back to Top

Contributed by PFCGuide staff, except where noted otherwise.
PFCGuide is sponsored by Dynamic Technology Group.
The information provided is for advice only and not to be considered a contract or a liability against Dynamic Technology Group.

Last revised: February 15, 2004 03:58 AM.