A
Alla
Hi,
I got a problem with binding custom objects to the controls. Let's say we
have 2 objects: obj1 and obj2. In my case DataGrid column is bound to the
obj1 and ComboBox in that column is bound to the collection of obj2 and has
its ValueMember as Guid and DisplayMember as string from the obj2. Inside
the obj1, I got Guid as a property. Obj1.Guid should match with obj2.Guid in
order to correctly display the value in the grid column. However it does not
display any value as I think it is trying to match obj1 with the obj2.Guid
instead of obj1.Guid with obj2.Guid. At the moment I am overriding Equals()
and ToString() methods and it works however it's probably a better way to do
it.
Thanks a lot
I got a problem with binding custom objects to the controls. Let's say we
have 2 objects: obj1 and obj2. In my case DataGrid column is bound to the
obj1 and ComboBox in that column is bound to the collection of obj2 and has
its ValueMember as Guid and DisplayMember as string from the obj2. Inside
the obj1, I got Guid as a property. Obj1.Guid should match with obj2.Guid in
order to correctly display the value in the grid column. However it does not
display any value as I think it is trying to match obj1 with the obj2.Guid
instead of obj1.Guid with obj2.Guid. At the moment I am overriding Equals()
and ToString() methods and it works however it's probably a better way to do
it.
Thanks a lot