This is a migrated thread and some comments may be shown as answers.

Can't bind to private class

1 Answer 22 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Brian Lam
Top achievements
Rank 1
Brian Lam asked on 22 Dec 2011, 04:16 PM
Hi,

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?

1 Answer, 1 is accepted

Sort by
0
Nedyalko Nikolov
Telerik team
answered on 23 Dec 2011, 01:05 PM
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.

Regards,
Nedyalko Nikolov
the Telerik team

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

Tags
GridView
Asked by
Brian Lam
Top achievements
Rank 1
Answers by
Nedyalko Nikolov
Telerik team
Share this question
or