Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Restricting Movement In A Grid
Message
 
À
05/02/2003 00:10:22
Carmen Gassi
Perseus Software Systems
Oakville, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00749228
Message ID:
00749685
Vues:
26
Hello Carmen;
I would use the valid event of the "Textbox" in the column, but I would code it as such:
IF !EMPTY(THIS.VALUE)
***display a messagebox saying the "the value entered "+this.value+" is invalid"
this.value = ""
return .f.
ENDIF
Good Luck
Mohammed
www.imaginecorp.com

>Hello All
> Is there a straightforward way to keep the cursor from moving to the next column or row in a grid? In my application, the user is adding detail records to a header file via a grid. I am using BeforeRowChange method to validate input into the cell. If the user keys in an incorrect value, I would like to the cursor to remain in the cell and provide a suitable error message. I have tried using the ActiveRow, ActiveColumn properties to return the cursor to the cell in which the incorrect value was entered, but this does not seem to work consistently. It seems to calculate rows of the grid based on the entire file while in my application, I have filtered the contents of the grid to match the header file information. Putting the question simply, is there a method or property to keep the cursor from moving based on correct input? Will the Valid method for the grid work better than the BeforeRowCol change ? Thanks for any suggestions.
>
>Regards,
>Carmen
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform