Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP5 Grid Control - BeforeRowColChange Event
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
VFP5 Grid Control - BeforeRowColChange Event
Divers
Thread ID:
00135505
Message ID:
00135505
Vues:
121
Okay, gang, here's one for your collective gray matter...

I have a two-column grid with a RightClick event that pops up a shortcut menu which, among other selections, allows the user to add a new row. The grid is *normally* read only.

When the row is added, I add a record to the view (optimistic table buffering) and make the grid read/write. The user needs to enter both fields (a code and a description) for a valid entry. Additionally, there's a "Close" button which could be clicked to destroy the form, so I must check for either a blank code or blank description and delete any row in the grid (the user can edit a row also) with an empty value in either column.

To enforce this, I placed some code in the BeforeRowColChange event which checks for the blank values, deletes any with blanks, and sets the grid back to read-only.

HERE'S THE RUB: I don't want this code to fire when I change *columns*, just when I change *rows*. The BeforeRowColChange event tells me the *column* I just left with the nColIndex parameter, but not the *row*, and there seems to be no way to determine both the row I'm leaving and the row I'm entering. Additionally, the BeforeRowColChange event fires when I move between *columns*, which turns the grid to read-only...and only allows the user to enter either the code *or* the description, but not both.

How the @#$%^&* do I do this??? (g)

TIA

Evan Pauley
Evan Pauley, MCP
Positronic Technology Systems LLC
Knoxville, TN

If a vegetarian eats vegetables, what does a humanitarian eat?
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform