Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error at Grid.Column.AddObject
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01365213
Message ID:
01365216
Vues:
8
>>I am working on the problem with Grid and memo I started in another thread. I am trying to use the code provided by Borislav to zero in on the problem. Here is what I am doing. In the INIT method of the form, I want to initialize grid to have one column only and to have EditBox in this column bound to the memo field of the cursor. I pointed below (in line) where I get an error:
>>
>>
>>*--- INIT method of the form
>>thisform.Grid.columncount = 1
>>thisform.Grid.Height = 200
>>thisform.Grid.Left = 20
>>thisform.Grid.Panel = 1
>>thisform.Grid.RowHeight = 85
>>thisform.Grid.Top = 26
>>thisform.Grid.Width = 320
>>	
>>thisform.Grid.Column1.Width = 278
>>thisform.Grid.Column1.Sparse = .F.
>>thisform.Grid.Column1.Name = "Column1"
>>	
>>thisform.Grid.Column1.RemoveObject([Text1])
>>thisform.Grid.Column1.AddObject("Edit1","EditBox")     && !! I get error on this line.
>>thisform.Grid.Column1.Edit1.Visible = .t.
>>thisform.Grid.Column1.controlsource = "V_MYVIEW.MYMEMO"
>>
>>
>>I get the following error on line .AddObject:
>>
>>Error with Edit1 - Value: Data Type Mismatch
>>Error No. 1881.
>>
>>If I click on ignore, I get to see the grid. But what does the error above mean? How to change the code to avoid the error?
>>
>>Thank you.
>
>Don't remove the object. Add a new one (EditBox) and set it to be currentcontrol. I think there were similar problems discussed here before.

I get the same error even if dont remove the Test1 object.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform