I'd like to build a two-column grid like this to display a set of key=value.
Here are the requirements:
- The user must only be able to change the value that matches Key2. Other values must remain read-only
- The user must be able to navigate and select a value cell either by using the up/down arrow keys, or by single-clicking on the cell
- Once a value cell has been selected, we make sure the value matches Key2, and if yes, the grid must switch to edit mode either through F2 (like Excel), through Enter, or by clicking a second time on the cell (since the user has already clicked once to select the cell -> a second click means switching to edit mode)
The reason I don't want users to switch to edit mode simply by starting typing, is that I want to reduce the risk of errors by making them switch to edit mode explicitely through either F2/Enter or double-click.
How can modify the grid so that it satisfies the requirements above?
FWIW, here's the code I used to display the two-column grid above.
Thank you.