General information
Category:
Forms & Form designer
>>Valid event is fired because you press a button i.e. move focus otside the grid. It's probably reasonable not to use Grid.Valid event. You can put all validation under 'Save' button if you have one.
>
>1. What if the user added 5 records and than there's a invalid data somewhere, how do I setfocus back to the 'error' record.
>
If you want to use VALID event to check the entered data, you can return .F. when you catch the error and the grid will not lose the focus.
>2. What if the second row entered depend on the first and the third on the second, etc.... Example, a part use in row1 cannot appear again in combobox of row2. Or the total sum of 'qty deliver' cannot exceed 'qty on hand'.
>
>In short, it's not user friendly to have the user keyin everything then finally realise the errors and redo everything again.
It probably is better using BeforeRowColChanged to check the entered data.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only