Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
ACTIVATECELL not working
Message
From
18/01/2000 10:53:06
Rex Mahel
Realm Software, Llc
Ohio, United States
 
 
To
18/01/2000 10:19:10
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00319400
Message ID:
00319453
Views:
15
Cetin,
My problem is that the recno() could be negative with added records. Also, with the SetFocus method, how can I go to the second record?

TIA

Rex

>>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform