Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DataBindings.Add();
Message
De
16/01/2006 21:27:49
 
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
01087341
Message ID:
01087397
Vues:
14
>(Hmm this doesn't make a lot of sense even if I know what I am talking about <s>)<

LOL! Well ... it makes a *little* bit of sense ... maybe. <s>

>I'll post some "real" code when I get back to work tomorrow.<

OK ... I'll read the "real" code when *I* get back to work tomorrow. =)

~~Bonnie


>Bonnie,
>Thanks for your reply.
>1) check
>2) check
><bg>
>I said it is probably something obvious, but not that obvious :)
>
>The same fooUserControl instance, that I am having a problem databinding, has another property that I databind to a different property in the same fooObject without any problems. (Hmm this doesn't make a lot of sense even if I know what I am talking about <s>)
>
>I'll post some "real" code when I get back to work tomorrow.
>
>Einar
>
>>Einar,
>>
>>In order for this to work, I think you need the following:
>>
>>1) "UserControlProperty" has to be a property in the UserControl class from which fooUserControl is instantiated (a real property, with Get/Set methods).
>>
>>2) "ObjectProperty" has to be a property in the Object class from which fooObject is instantiated (again, a real property).
>>
>>If you already *do* have it set up like this, how about posting some relevant code?
>>
>>~~Bonnie
>>
>>
>>
>>
>>>I am having some problems adding a databinding to my object. The following line throws an exception:
>>>
>>>this.fooUserControl.DataBindings.Add("UserControlProperty", this.fooObject, "ObjectProperty");
>>>
>>>
>>>The exception caught is:
>>>
>>>System.ArgumentException: Object type cannot be converted to target type.
>>>
>>>
>>>I can't figure out why the exception is thrown. I am sure I am overlooking something very obvious.
>>>
>>>Any help would be appreciated.
>>>
>>>Thanks,
>>>Einar
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform