Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help!!!! Setting column and row focus in grid
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01294755
Message ID:
01294792
Vues:
28
>>>>>Fred
>>>>>
>>>>>That moves me to row 2 column 10
>>>>>
>>>>>I want to go to row 2 column 9
>>>>>
>>>>>Thanks
>>>>>
>>>>>Colin
>>>>>
>>>>>
>>>>>>>Hi
>>>>>>>
>>>>>>>I have 10 columns in a grid - a button sets my focus at row 1 column 9 - after completing column 9 the cursor moves to colum 10
>>>>>>>
>>>>>>>Afer column 10 I want to set the focus to row 2 column 9 etc
>>>>>>>
>>>>>>>How do I do this?
>>>>>>>
>>>>>>>Thanks
>>>>>>>
>>>>>>>Colin
>>>>>>
>>>>>>Perform a SKIP in the Grid.RecordSource.
>>>>
>>>>Then you still need to position to the correct column. You can use the Grid.ActivateCell to position the column, for the Grid.ActiveRow after the skip. Note that these properties can only be referenced within the grid while the grid has focus.
>>>
>>>Sorry I don't understand your answer
>>>
>>>I'm writing my code from text1.lost focus of column 10 - where do I find grid.activatecell?
>>>
>>>Could you do me a favour please and give me a couple of lines of code to illustrate?
>>>
>>>Thanks
>>
>>Try this in the Grid.BeforeRowColumnChange:
>>
>>
IF nColIndex=10
>>  NODEFAULT
>>  SKIP IN (this.RecordSource)
>>  this.ActivateCell(this.ActiveRow,9)
>>ENDIF
>
>Fred
>
>You're a star
>
>Thanks a lot
>
>Colin

No problem. Hope it helps.
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform