Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Keeping Optiongroup in a grid
Message
De
22/07/1997 09:16:52
Ron Tse-Jung Huang
Leader Professional Consulting
Shin-Chu, Taiwan
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00040164
Message ID:
00041102
Vues:
37
Thanks Barbara,

Following your suggestion, I have worked out the problems I had with my grid.
It also works on some other case that I have encountered. Thanks!

Best regards,
Ron.

>>>>Dear sir,
>>>>
>>>>I used SelectSQL to generate a temporary table, and make it the record
>>>>and control source for a grid. The grid had one optiongrop added into
>>>>one of its column.
>>>>
>>>>Each time the SQL commanded executed, the table was regenerated, and the grid's source properties were assigned. However, it just showed the optiongroup successfully the first time SQL executed. After that, only values were shown onto the grid, and optiongroup disappeared. how can I keep the optiongroup in the grid?
>>>>
>>>>many thanks!
>>>
>>>After you requery or re-execute the SQL, try issuing:
>>>
>>>ThisForm.Grid1.Column#.CurrentControl=OptionGroup
>>
>>
>>I have tried to assign the currentcontrol to the optiongroup. When executed at the first time, there is no problem. However, after that, problem occured. An error message shows "Expression evaluated to an illegal value", when I did not addobject'ed an optiongroup programatically.(I have inserted an optiongroup into the grid when GRAPHICALLY implemented the form.)
>>
>>Another way I tried was to issue an addobject command to add the optiongroup, and removeobject the textbox which was initially set as default control. Also I assigned the currentcontrol properties to the optiongroup. However, it did not work either, leaving gray shadow on the column.
>>
>>Even only a refresh() method was triggered, the problems occurred.
>>
>>Any comments about this?
>
>Try setting your grid recordsource to "" before you requery your SQL, then re-setting it to the new table/cursor, even though it's the same name. There have been threads about grids re-setting column properties to default grid values during a re-query.
>
>HTH
>Barbara
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform