0

The user might click with the mouse on a different TableView row or use the up/down arrow keys to go to a different row. However the current row may be 'invalid' and I want to effectively stop the row change happening. I'm looking for a 'validate' or a 'veto' method somewhere. I understand that a workaround might be to observe the row change and immediately put the selected row back to where it was before - at the invalid row. Probably this workaround is the only answer. If so what is the best approach?

By the way the TableView itself is not used for any editing - it is a view-only control.

Chris Murphy
  • 6,411
  • 1
  • 24
  • 42
  • Maybe disable the tableview at all.. – Uluk Biy Nov 08 '14 at 08:10
  • That's an important comment. If the table is disabled then any keystrokes or mouse clicks will be ignored. Done like: disable <== !currentPersonOH.isValidProperty. 'OH' stands for 'object holder', a container for the current person, which has a val BooleanProperty in it called isValidProperty – Chris Murphy Dec 03 '14 at 00:50

0 Answers0