PxPlus User Forum

Main Board => Knowledge Base / Training => FAQs => Topic started by: PxPlus on May 30, 2018, 04:32:15 PM

Title: Common misconception about which cell in a GRID was changed
Post by: PxPlus on May 30, 2018, 04:32:15 PM
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.