Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Controlling Grid Position
Message
 
To
24/10/1997 01:00:10
Jon Ziegler
Mannesmann Dematic Corp.
Solon, Ohio, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00056455
Message ID:
00056478
Views:
33
>>I am totally annihilated by the grid. It is beyong my control. Anyone knows how to control it properly?
>>
>>I have 4 fields in my tables. One is a foreign key (parent_key) to my parent table. One is the table surrogated primary index(mykey). One is Roll_no and the last one is the Weight. The Roll_no and Weight are shown in the grid.
>>
>>The Roll_no is an incrementing number from the previous number. For example, If the user keys in 9 in the current record, the next roll_no will be defaulted to 10. For quick entry, my user wants to keep the cursor running down on the weight column while the roll_no increments automatically from the previous roll_no. The user can change the roll_no to start from another number whenever necesssary.
>>
>>Well, it is a simple problem. I have done it on array. But on grid, the grid seems to be beyond my control. First, the cursor doesn't seem to follow my record number/pointer (This is a mystery? I didn't forget to refresh!) Second, when I tried using GRID.ACTIVATECELL, the cursor also refuses to move down. (using relativerow+1). The cursor just moves to the first column (I only have two columns).
>>
>>Anyone can tell me what may go wrong. I am more concern about the first problem because even after I issue APPEND BLANK, the cursor doesn't move down. It just stays on the same record.
>>
>>Any suggestion? The problem lies in the controlling of grid more than anything else.
>
>The grid's ActivateCell() method controls only the viewable portion of the grid. I don't think (although I haven't tried it) that it can be used to scroll the grid. Try using the SKIP command to move to the next record in the table, which will move to the next record in the grid. Also, LOCATE might work to move the record pointer within the grid. IOW, try manipulating the table, which will be reflected in the grid (after refreshing, of course!).
>
>After using SKIP to move to the next record, you could then use the ActivateCell() method to move to the proper column, using the ActiveRow property as the row.


To activate a not visibile column try with this code :

Grid.ActivateCell( Grid.RelativeRow, Grid.Column2Activate.ColumnOrder - ( Grid.ActiveColumn - Grid.RelativeColumn))
Renato Bertuol (EMail:renato.bertuol@elmec.it
Homepage:www.geocities.com/SiliconValley/Horizon/3216)
Elmec Informatica (URL www.elmec.it)
Previous
Reply
Map
View

Click here to load this message in the networking platform