Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using the Valid Events in a Grid
Message
De
28/09/2001 03:15:34
Jimi Lee
Pop Electronic Products Ltd.
Hong Kong, Hong Kong
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Using the Valid Events in a Grid
Divers
Thread ID:
00561814
Message ID:
00561814
Vues:
68
Hi all,

I have a grid, in MyGrid.Column1.Text1.Valid(), I have such code:
if len(allt(this.value))<4 then
  wait window "flag 1"
  this.value=padl(this.value, 4, "0")
  wait window "flag 2"
endif
I just want to ensure the content of this field have a length of 4 in all records, but it doesn't work.. there are two cases:

(1)
If I input "1", then use my mouse or press tab to setfocus to next column, both "flag 1" and "flag 2" are poped up, but the content of the cell didn't change..

(2)
If I input "1", then use my mouse ot press the down button to setfocus to next row, nothing would happen, no pop up window, content no change..
But when I go back to the cell again, the "flag 1" and "flag 2" will appear, content still nor changed.

I guess the grid used the value of the cell I have switched to, other than the original cell, but I think valid event is fired before it lostfocus, why did it not use the original value? How should I do?

I need to be able to check the value by code because after setting the length to 4, I still have some other checking to perform in this cell, and have to change it's value if the tests are failed..

I hope I've describe the problem clear enough, any idea or suggestions would be greatly appreciated!!

Jimi
error(503): file structure failure, signature file corrupted.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform