Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ACTIVATECELL not working
Message
From
18/01/2000 10:19:10
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
18/01/2000 09:06:07
Rex Mahel
Realm Software, Llc
Ohio, United States
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00319400
Message ID:
00319438
Views:
14
>All,
>
>I am having a problem with the ActivateCell function.
>
>I have two grid on a form and I want to be able to tab from one to the other. When I leave one of the grid and reenter from the top, the active cell is the last cell activated even though I am issuing a This.Grid2.ActivateCell(This.Grid2.RelativeRow,1) command.
>
>Below is the code for my NextGrid function
>
>
>*NextGrid()
>loNextGridList = This.GetNextGridList()
>
>IF ISNULL(loNextGridList)
>	RETURN loNextGridList
>ENDIF
>
>loNextGrid   = loNextGridList.GridList
>liNextColumn = loNextGrid.GetFirstColumn()
>
>loNextGridList.SetFocus()
>liRelativeRow = loNextGrid.RelativeRow
>loNextGrid.ActivateCell(loNextGrid.ActiveRow,liNextColumn)
>
>
>
>This code should move from the last column of the previous grid to the first column of the next grid, but the cell last activated in the next grid is reactivated.
>
>What am I doing wrong?
>
>TIA
>
>Rex


Rex,
It's very hard to see what's going on there w/o reproducing it. Instead I would suggest an easier way (IMHO) rather than to use relative*, active* properties. For row index, use table's recno(), for column index instead of setting focus to grid :
loNextGridList.Columns(ix).SetFocus()
Hope helps.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform