Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid anomoly trouble
Message
From
14/04/1998 11:28:19
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Grid anomoly trouble
Miscellaneous
Thread ID:
00091787
Message ID:
00091787
Views:
76
I have a form that allows the user to navigate through recirds using a grid. Clicking on or scrolling to a record refreshes the data-bound controls on the form.
The form uses row buffering, so moving the record pointer in the grid issues a TABLEUPDATE(). This is the way that the user wants it.
The trouble comes because certain fields have rules that they need to follow before the data can be saved. No problem, I'll check the values against the rules in the beforerowcolchange event of the grid, and issue NODEFAULT if one of the fields fails. This works. The problem I'm having stems from two (IMHO stupid) features of the grid:

1. a grid's beforerowcolchange and afterrowcolchange events fire when the grid gets focus.

2. A grid's record pointer and dynamic properties are not updated with its refresh method, but with its gotfocus event.

So if I change a value on the form of a field that affects one of the dynamic properties, I must set focus to the grid and then back to the current control. I could live with this except for that doing this fires my validation rules.
I figure I could get around this in one of two ways: refresh the grid's properties somehow without setting focus, or somehow determine in the beforerowcolchange event if the row or column really changed.

Suggestions?
Erik Moore
Clientelligence
Next
Reply
Map
View

Click here to load this message in the networking platform