Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6903309
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:54:35+00:00 2026-05-27T07:54:35+00:00

I am stuck with BindingList where T is an interface that extends A interface.

  • 0

I am stuck with BindingList where T is an interface that extends A interface. WHen i use this bindingList in bindings, only properties from T are visible, while properties from inherited A interface are not. Why is it happening? It looks like a .net bug. This i required for my 2 projects to share some common functionality. Also the binding List has PropertyDescriptor empty, when PropertyChanged event is tunneled from baseImplementation.
Attached interfaces and implementations. SetUp method in the end

interface IExtendedInterface : IBaseInterface
{
    string C { get; }
}

interface IBaseInterface : INotifyPropertyChanged
{
    string A { get; }
    string B { get; }
}

public class BaseImplementation : IBaseInterface
{
    public string A
    {
        get { return "Base a"; }
    }

    public string B
    {
        get { return "base b"; }
        protected set
        {
            B = value;
            OnPropertyChanged("B");
        }
    }

    protected void OnPropertyChanged(string p)
    {
        if (PropertyChanged != null)
            PropertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(p));
    }

    public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
}

public class ExtendedImplementation : BaseImplementation, IExtendedInterface
{
    public string C
    {
        get { return "Extended C"; }
    }
}

 private void SetupData()
    {
        BindingList<IExtendedInterface> list = new BindingList<IExtendedInterface>();
        list.Add(new ExtendedImplementation());
        list.Add(new ExtendedImplementation());
        dataGridView1.DataSource = list;
    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T07:54:35+00:00Added an answer on May 27, 2026 at 7:54 am

    The properties are obtained via (indirectly) TypeDescriptor.GetProperties(typeof(T)), but the behaviour is as expected. Properties from interfaces are never returned, even from class-based models, unless they are on the public API of that type (which for interfaces, means on the immediate type). Class inheritance is different because those members are still on the public API. When an interface : ISomeOtherInterface, that is “implements”, not “inherits”. To give a simple example of when this could be a problem, consider (fully legal):

    interface IA { int Foo {get;} }
    interface IB { string Foo {get;} }
    interface IC : IA, IB {}
    

    Now; what is IC.Foo ?

    You might be able to hack around this by registering a custom TypeDescriptionProvider for the interface, or using an ITypedList, but both of those are tricky. To be honest, data-binding simply works more easily with classes than interfaces.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Stuck with this particular issue. I have code that get lots of pages from
I'm stuck with .Net 1.1 application (i.e. I can not use the generics goodies
Been stuck on this for a while and tried a few various things. Basically
Stuck with an unusual problem, would seem that I love doing things that's not
i am stuck by this code snippet that emulates server-client interaction,suppose that sockfd is
Im stuck I got this flash that need's to be configured in a certain
Being stuck with a legacy database schema that no longer reflects your data model
I'm a bit stuck on this. Basically I want to do something like the
I'm kinda stuck with this one so I hoped someone could help me. I
Stuck with this issue for the past 2 days :-( Trying to create draggable

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.