Property of object to Binding

B

Boniek

Hi,

I have next question :). I have a object which work as dataSource for
other objects. I implemented IBindingList (IList, ICollection) etc. I
have problem when I want bind my controls ( TextBox etc) to that object.
My application throw exception that it can't find property in my object
with a name in a constructor of Binding class. I know that it want
property of object which is in the collection of my dataSource
collection but my object work dynamically (have different data ) and I
want do that as DataTable work. How I can give my properties for
actually state of my object. What I must implement to do that.
DataTable has DataColumns collection and I can create DataColumns in
running application.

Thank's for help
Boniek
 
?

=?ISO-8859-2?Q?Marcin_Grz=EAbski?=

Hi Boniek,
Hi,

I have next question :). I have a object which work as dataSource for
other objects. I implemented IBindingList (IList, ICollection) etc. I
have problem when I want bind my controls ( TextBox etc) to that object.
My application throw exception that it can't find property in my object
with a name in a constructor of Binding class. I know that it want
property of object which is in the collection of my dataSource
collection but my object work dynamically (have different data ) and I
want do that as DataTable work. How I can give my properties for
actually state of my object. What I must implement to do that.
DataTable has DataColumns collection and I can create DataColumns in
running application.

Thank's for help
Boniek

I think that objects in your collection (IBindingList) doesn't match
the binding criteria. e.g. you want "DisplayField" to be a DisplayMember
but your objects doesn't have "DisplayField" property.
Similar error uccures when you want to set "Sort" of DataView to name
that doesn't exists in DataTable.Columns collection.

I hope it helps...

Marcin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top