Hello,
I'm binding my grid to a BindingSource. BindingSource.DataSource points to an interface "IMyInterface2", which extends another interface "IMyInterface".
At design time I only see the columns corresponding to properties of IMyInterface2. The properties of IMyInterface are not there. I think it should show every property from IMyInterface and IMyInterface2.
Furthermore, at runtime all the properties from IMyInterface and IMyInterface2 are there. That's very weird.
Have you seen this behavior?
Thanks.
Just to make myself clear, the implementation would look like this:
public interface IMyInterface
{ string PropertyA {get; set;}}
public interface IMyInterface2 : IMyInterface
{ string PropertyB{get; set;}}
Then I set the BindingSource.DataSource to IMyInterface2.
At design time I only see PropertyB. At run time both PropertyA and PropertyB are bounded to the grid.
Hi Oscar,
This is nothing to do with the grid. The BindingManager in DotNet will only expose the properties of the derived interface. You will get the same results binding to any control.