PxPlus User Forum

Twitter Twitter Twitter

Author Topic: Common misconception about which cell in a GRID was changed  (Read 650 times)

PxPlus

  • Administrator
  • Diamond Member
  • *****
  • Posts: 1062
    • View Profile
When a cell in a grid changes you need to use the row and column numbers returned the GRID READ directive to determine which cell changed.

The properties 'CurrentRow and 'CurrentColumn don't necessarily reflect the changed cell - they indicate which cell the input is currently positioned at.

Consider the following: If you are in cell 1,1 and enter some data then use the mouse to change to cell 2,3 ; the grid will generate an ON CHANGE event. When you issue a GRID READ you will get column 1, row 1, and the new data. If, however, you were to check current row/column they would say 2,3 which is where you are now positioned.

When using NOMADS the values returned from the GRID read will be in XXXXX.ROW and XXXXX.COLUMN where XXXXX is the name of the grid.

Note that the GRID READ is queued internally -- that is if the user types quickly and changes multiple cells the system will queue up multiple events and row/column values for each.