Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
3 Grid Questions
Message
From
08/07/1999 07:47:49
 
 
To
08/07/1999 07:18:25
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00238736
Message ID:
00238752
Views:
17
>thought as a beginner, I'd start simple. Silly me. I haven't yet found anything in vfp that qualifies as simple!
>
>Anyway...
>
>1 - the grid in question is the third page of a pageframe and simply presents the information in list form which is seen/entered in detail on page 1. No relationships. Nice and easy (I thought!)
>
>But how do I get it to 'start' at the record I'm looking at on the first page. It ignores my activation (or grid init) code (go to the current record as recorded on page1) and always starts at the top of the file.
>
>Conversely, whatever record I'm on when I leave the grid is correctly displayed back on page 1.
>
>2 - How do I get the numeric fields to align right? The obvious path was to set the appropriate column textbox alignment property to "1 Right" but although I managed to correctly align the appropriate Header ("Middle Right") the textbox alignment sullenly ignores me!
>
>3 - I select a query and rename it to the same name as the original file in order to preserve the way the forms work for the selected data. While this works for the ordinary forms, the grid just goes blank! I suspect this has something to do with the event sequence and the fact that, for the query data, I have 'used' the database AFTER the grid has instantiated. If so, how can I force it to 'reinstantiate' after the query has been set up?
>
>Finally is there a definitive guide to grid behaviour with code examples and useful hints?
>
>Harry

Some thoughts you might try:

On 1) Are you refreshing the page/grid after finding the record ( e.g. THIS.REFRESH in the page Activate event?

On 2) Are you binding to a numeric field and have you set the alignment at the textbox level of the grid?

On 3) Grids are notorious for losing their attributes when you blow away the underlying RecordSource. The common workaround for this is to set the grid RecordSource to nothing before manipulating the cursor then resetting the RecordSource. I.e.:

THISFORM.MyGrid.RecordSource = ''
* recreate your cursor RecordSource here
THISFORM.MyGrid.RecordSource = 'MyCursor'

You might need to set other grid/column/textbox parameters also.

Hope some of this addresses your difficulties.

Bill
William A. Caton III
Software Engineer
MAXIMUS
Atlanta, Ga.
Previous
Reply
Map
View

Click here to load this message in the networking platform