Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Grid problem with SET RELATION TO
Message
De
10/09/2005 13:09:57
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
10/09/2005 13:06:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP1
Divers
Thread ID:
01048399
Message ID:
01048434
Vues:
21
Good luck. Tabbing the grid implicitly select's its recordsource (and should not be something like lockscreen=.t.).
Cetin


>A reasonable enough shot in the dark, but, unfortunately, it didn't hit the target.
>
>The curious thing here is that even if I cause the entire form to be refreshed, the display of that column is wrong; if I tab to the grid, then the column shows up correctly.
>
>As for simple relation + controlsource construction -- yes, that has always worked for me as well, which is why I'm so puzzled by this.
>
>In the meantime, I'm fumbling around trying an alternative technique that will avoid the relation altogether.
>
>Thanks
>
>>Oh so you have many custom code with also code in grid.refresh. Then you would need to find offending code. With a simple relation + controlsource construction it works as it should for me.
>>One idea (shooting in dark). In controlsources setting might it be you didn't add quotes? ie:
>>
>>myGrid.Columns(1).Controlsource = myTable.MyColumn
>>Cetin
>>
>>
>>
>>>The relation is set in the same method that creates the cursor which is my recordsource. This method is called by the form's Init. Columns are added later.
>>>
>>>The grid's refresh method changes the size of the grid, and conditionally adds scrollbars. Even with this code disabled, I still see the same behavior.
>>>
>>>Jim
>>>
>>>>Where is the relation set? Refresh problem?
>>>>Cetin
>>>>
>>>>>No, I know nothing about dataenvironments, and have never used them to my knowledge. Never heard of InitialSelectedAlias, either.
>>>>>
>>>>>Jim
>>>>>
>>>>>
>>>>>>>I'm having a problem with a grid when using a technique which has worked in many other instances:
>>>>>>>
>>>>>>>My RecordSource is cMyTable. I have set
SET RELATION TO siteid INTO cSiteTable IN cMyTable
and I have a column who's controlsource is cSiteTable.name
>>>>>>>
>>>>>>>When I bring up the form, all the values appearing in this column are the same (the value from the first record in cSiteTable). It's as if I had not set a relation.
>>>>>>>
>>>>>>>When I then focus on the grid by tabbing to it, the values in this column refresh to be what I expected in the first place.
>>>>>>>
>>>>>>>Is the SET RELATION irrelevant until I actually focus on the grid?
>>>>>>>
>>>>>>>Thanks
>>>>>>
>>>>>>Probably you have a dataenvironment and InitialSelectedAlias is not the parent cursor.
>>>>>>Cetin
Ç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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform