Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid anomoly trouble
Message
De
14/04/1998 12:27:27
 
 
À
14/04/1998 11:28:19
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00091787
Message ID:
00091814
Vues:
27
>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?

Actually, grid reevaluates pointers in afterrowcolchange event (not in gotfocus), that's another story that gotfocus fires this event. I think you could call afterrowcolchange event (assuming that dynamic properties reset there) programmatically from some appropriate place in your program.
Edward Pikman
Independent Consultant
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform