Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid.RecordMark - Where's it come from?
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00512797
Message ID:
00513123
Views:
12
Hi!

Ok, understand. Did a lot of effort to make the generic grid class, but never concerned with record pointer. I met the same problem a long time ago and we did not found a fix to the VFP record mark in grid. Record pointer refreshed correctly as soon as user set the focus to grid. You can try to do following programmatically:

form.grid.SetFocus() && set focus to grid
DOEVENTS
this.SetFocus && set focus back to the control

And strange, but wrapping above code into the lockscreen makes no effect, so flushing is not avoidable.

Another solution I can propose is to use custom object put over the grid that shows the record pointer. Just refresh its position above the grid accordingly the currsnt record in the AfterRowColChange event and in other places where needed. I know it is messy, but when you really need it...

As about generic class, you always can add such column or object, with unique name. If you want more details, I can describe a lot of things abot that. Add a column, change the column order, fix the column as the leftmost using grid.LeftColumn and columnorder of column etc etc. A lot of mess too.

Or just use the Grid row highlighting.

YMMV.

HTH.

>Vlad,
>
>>>...You can try to simulate the current record pointer programmatically, much the same approach as grid row highlighting. Make a column, remember the recno() of the record source in the nRecNo property of the grid, than specify properties of the column...
>
>Yes. I've tried that and it does work. Unfortunately, it requires that the grid's recordsource have the pseudo recno field. I'm trying to make this grid class as generic as possible. IOW, I don't want to force the cursor/table to have any columns that exist only to make the grid happy.
>
>Thanks anyway,
>Thom C.
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Previous
Reply
Map
View

Click here to load this message in the networking platform