01-23-2020 03:24 PM
Entering data in a table cell and using the cursor keys to move from cell to cell does not generate an EVENT_COMMIT so the data is lost. How to get the data using the cursor keys only like in Excel?
Solved! Go to Solution.
01-29-2020 04:54 AM
The table control cannot be easily tailored to operate exactly as Excel does, but it still gives you a series of events that can facilitate getting data the user enters in it.
The very first event you must check is EDIT_MODE_STATE_CHANGE which informs you of when the table is in edit mode. After that moment, the user can move from cell to cell with tab/shift-tab (horizontal move) and Enter/shift-enter (vertical move) and you receive the ACTIVE_CELL_CHANGE event in this case. When the user types in something you receive a series of VAL_CHANGED events together with a EVENT_COMMIT event when the cell changes. Despite receiving the commit event after the cell change event, the former one reports the cell being changed in eventData parameters.
With a bit of care in coding, you should be able to handle the situation without losing any data.
01-31-2020 06:59 AM
Thanks for the reply, I have also used LW/CVI from 3.1 but not as often as I'd like to.