Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid Row Validation
Message
From
21/10/1997 02:22:35
 
 
To
07/10/1997 17:35:57
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00053303
Message ID:
00055689
Views:
27
>>A row in a grid needs to be validated BEFORE allowing the user to leave therow without relying on DBC rules (pre-validation is desirable with remote tables and with table buffering) We need properties we can test in
>>BeforeRowColChange to let us know where the user is trying to go. Remember the VALID clause of a Browse?
>>
>>BeforeRowColChange should have LPARAMETERS for the new row and column the user is trying to go to. These parameters should retun 0 if the user clicks outside the grid. With that information, we could trigger record validation at the grid level to prevalidate row data when we are using table bufferring.
>
>However the LPARAMETERS only includes an index number for the COLUMN the user selects. Is it possible to determine whether or not they're trying to access a different ROW? Ultimately, is it possible to restrict access of a grid to one row at a time?

I used optimistic table buffering with a view to handle this problem, which meant I actually had to let the row update in the buffer (not in the view), then in "AfterRowColChange" event I checked to see if they switched columns or rows. If they switched rows I returned to the row and validated it, then sent them back to the row they went to if the val passed, if not they stayed in the invalid row. It was a painful thing to code, and there may be a better way, but I talked to someone at devcon who also had to do it this way.
cuo
tc
Previous
Reply
Map
View

Click here to load this message in the networking platform