Hi,
I am having trouble finding the correct events for the following scenario (simplified :))
I have a grid, 4 columns, labeled A, B, C, D. All cells are editable, plain text editors.
On the Add Row,
If the user enters "Mark" in column A, I want to make column B read only and skip to column C. ( I will fill in column B with the correct, uneditable value).
If the user enters "Mike" in column A, I want to allow the user to enter a value in column B.
I have tried to accomplish this using Tabstops, BeforeCellUpdate, AfterCellUpdate, BeforeCellActivation and BeforePerformAction.
I am using version 13.2.
All help appreciated!
Thanks!
Mark
Thanks, Hristo, I overlooked the options tab.
This is the sample projectI used to test navigating to the next cell based on the user entry in the current cell. It will skip the next cell based on the user entry in the first cell.
Thanks again for all your help.
Hello,
Thank you for your feedback.
In order to upload file to our forum, first you should zip the file (there is limitation about the size of the file is 4MB), after you compose your response, go to “Option” tab and press “Add/Update” button, navigate to the zip and press “Save” button.
Please let me know if you have any further quest6ions.
Hristo,
Thank you for responding. Your example was very close and did lead me to the final solution.
The problem with using the CellChange event is that you must know all of the valid values and then check for them. I need to perform logic after the user has entered the data, and based on that logic determine if the next cell is available to the user or not.
I had been focusing on the CellUpdate events and evidently the next cell is already determined before any of these events fire. CellChange was close, but I wanted to wait until the user finished and navigated away from the cell. Usually this is with the TAB key, so I moved your code there and it was very close and I was able to get it to work with minor modifications. Then the issue was with clicking out of the cell. I used the ClickCell event to handle this.
I modified the example so it is working properly and would like to share it. How can I attach it?
Thanks again,
Hello Mark,
You could manage activation mode on the ell level via Activation property, so I suggest you to use CellChange event where based on the entered value in cell of column A to allow/ disallow editing of cell of column B. I’ve implemented this suggestion in small sample.
Please let me know if you have any further questions.