Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help!!!! Setting column and row focus in grid
Message
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01294755
Message ID:
01294790
Views:
20
>>>>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
Specialist in Advertising, Marketing, especially Direct Marketing

I run courses in Business Management and Marketing
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform