Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Display contents of memo field in grid control
Message
De
15/09/1998 16:29:03
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00136892
Message ID:
00136981
Vues:
34
>>>>>>Hi, I have a grid control and using editbox as CurrentControl property. When user open the form I would like the editbox displays the content of memo field instead the "Memo". Can anybody help me?
>>>>>>Thanks, Tai Fei Pao
>>>>>
>>>>>It should work, set Column.Sparse=.f.
>>>>
>>>>Thanks for your help. Can you help me with another problem? If I need change the grid control column count in the runtime, what is the best way to handle it? Do you have any example that can help me to start?
>>>>
>>>>Thanks again, Tai Fei Pao
>>>
>>>If you want to add new column, you can use Grid.AddObject() or Grid.AddColumn(), after this you should also set programmatically Column.controlsource and any other specific properties. You can use Grid.RemoveObject() to remove some column(s).
>>
>>Thank you very much. Tai Fei Pao
>
>Sorry, I need additional help. I put code in form init property and try to add a column to a grid control.
>
>THISFORM.Pageframe1.Page2.Grid1.AddColumn(5)
>THISFORM.Pageframe1.Page2.Grid1.Columns(THISFORM.Pageframe1.Page2.Grid1.ColumnCount).Name = "Column5"
>WITH THISFORM.Pageframe1.Page2.Grid1.Column5
> .FontBold = .T.
> .FontSize = 8
> .ControlSource = ""
> .CurrentControl = "Edit1"
> .Width = 156
> .Sparse = .F.
>ENDWITH
>
>I get a error message on CurrentControl line. How do I change the code and let the VFP know that I add a editbox control and try to change the CurrentControl from the textbox to editbox?
>
You should add editbox to the column first:
.AddObject("edit1","editbox")
Edward Pikman
Independent Consultant
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform