Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid ActiveRow and RelativeRow ??
Message
From
20/10/2004 16:00:15
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Grid ActiveRow and RelativeRow ??
Miscellaneous
Thread ID:
00953117
Message ID:
00953117
Views:
51
Hello,

Sergey helped with this problem a little earlier. The problem has progressed a little further. Here it is.

The table in question (for now) has just two rows. When the form with the grid opens, the pointer is on the last record in the logical order based on the current tag order of the table. However, the grid is only showing one row which is the current record in the table - record #1 is not visible unless you scroll upwards.

Ideally, I want to position the current record in the table in a similar position in the grid ie., if there are two records in the table and record two is the current record in the table, I would like record #1 to be the first row in the grid and record #2 to be the highlighted second row in the grid.

Taking this a step further, if the current record in a table of say thousands of records is somewhere in the middle of the table, where would you generally try and position the table's current record in the grid? Would you try for the middle of the grid?

I have tried to call DoScroll() in the form's init method but the grid's relativerow and activerow seem to be zero because the grid doesn't have focus at that time. Even if they did have values, I am unsure what to actually do with them anyway :( I am really confused!

What should I do to position the current record in the underlying table to a resonable position in the grid? Is there a "rule of thumb" used in these cases?

Thank you so much,

Angie.
Next
Reply
Map
View

Click here to load this message in the networking platform