Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid Refreshing
Message
From
25/09/1998 11:20:42
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
25/09/1998 11:13:38
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00137946
Message ID:
00140829
Views:
31
Keith,
A shoot in the dark. Might controlsources assigned wrongly (without "") ?
Cetin

>Ok, thanks to all who pointed me in the right direction
>on blanking out the RecordSource and ControlSource when
>closing and reopening the referenced table. I wrote a
>generic set of methods that save and restore them (Brenda
>your code was librally hacked, moochos grassy-ass). So
>I then did something like
>
>THISFORM.SaveSources( loMyGrid)
>
>USE (DBF()) EXCL
>ZAP
>USE (DBF()) SHARED ALIAS ProfileSrc
>
>THISFORM.RestoreSources( loMyGrid)
>
>I then discovered that the relations set in de
>dataenvironment were destroyed (of course) when the table
>is closed. I then created a method to save any relations
>in effect that the table I'm closing is involved in (parent
>or child). So my code now looks like
>
>THISFORM.SaveRelations( ALIAS())
>THISFORM.SaveSources( loMyGrid)
>
>USE (DBF()) EXCL
>ZAP
>USE (DBF()) SHARED ALIAS ProfileSrc
>
>THISFORM.RestoreSources( loMyGrid)
>THISFORM.RestoreRelations()
>
>The grid displays the RECNO() and id number from the table
>I'm ZAPping and the LAST_NAME + ", " + FIRST_NAME from a
>related table.
>
>The problem is now that when I'm in the grid and go to the
>next row all of the names in the grid change to the value of
>the current record.
>
>Just as a debugging technique I did a
>oGrid.SaveAsClass(..."before")
>.SaveRelations
>Reopen excl
>ZAP
>Reopen shared
>.RestoreRelations
>oGrid.SaveAsClass(..."after")
>
>and took a look at the class code and basically besides the
>"before" and "after" names, everything is identical.
>
>What am I doing wrong NOW???
>
> ...kt
>
>>I have a grid on page two of a form. I'm using it to
>>browse records added to a temporary table. If I start
>>out with the temporary table populated and go to the
>>page containing the grid, it shows the records correctly.
>>If I then clear (ZAP) the table (on page on) and then
>>add a record to the table (so now there's only one
>>record in the table) and switch to page two the grid
>>shows that there are no records in the table.
>>
>>To get any records to show at all I have to close the
>>form and re-run it.
>>
>>The grid's Refresh event is being fired.
>>
>>What's happening?
>>
>> ...kt
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform