Can't bind to private class

2 posts, 0 answers
  1. Brian Lam
    Brian Lam avatar
    28 posts
    Member since:
    Apr 2010

    Posted 22 Dec 2011 Link to this post


    I have a private class that implements a public interface, and I've bound the RadGridView to a collection of the interface.

    public interface IFoo { ... }
    private class Bar : IFoo { ... }
    var items = new ObservableCollection<IFoo>();
    items.Add(new Bar());
    GridView.ItemsSource = items;

    It seems like the RadGridView then attempts to cast the items to type Bar using reflection, which fails because Bar is a private class. Is there any way to tell the RadGridView that it should assume the items are of type IFoo instead of trying to cast them to Bar? If not, can this be supported in the next release?
  2. Nedyalko Nikolov
    Nedyalko Nikolov avatar
    871 posts

    Posted 23 Dec 2011 Link to this post

    Hi Brian,

    Indeed with the current version there is no way to achieve such behavior. We are aware about this problem and we are doing our best in order to fix it. Unfortunately I cannot commit with a specific date or release when this issue will be fixed.

    Nedyalko Nikolov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top