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:
00749234
Vues:
22
Use a WHEN event in the textboxes that you need to prevent setting focus to:
procedure oGrid.Column2.text1.When       && when even of the text requiring
                                         && setfocus prevention
return !empty(oGrid.Column1.text1.Value) && This test allows focus
                                         && to Column2's text providing
                                         && Column1's text is not empty
>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
Imagination is more important than knowledge
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform