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

GridView - Anonymous Types wont bind

2 Answers 94 Views
GridView
This is a migrated thread and some comments may be shown as answers.
ransems
Top achievements
Rank 1
ransems asked on 01 May 2009, 05:59 PM
Hi,

    My goal was to use anonymous types as a quick way to filter and arrange my data for the grid.
But when I bind to the GridView like this:

MainGrid.ItemsSource = (From User In GroupMembers Select User.Username, User.UserId).ToList


I then get this on the following line, no matter what.

MethodAccessException
Telerik.Windows.Data.RecordTreeBuilder`1..ctor(Telerik.Windows.Data.RecordManager, Telerik.Windows.Data.IRecordFactory, Boolean)


My GridView has the following properties set:
IsReadOnly="True"
ColumnsWidthMode="Auto"

Thanks for your help,
-Jason

2 Answers, 1 is accepted

Sort by
0
Accepted
Hristo
Telerik team
answered on 04 May 2009, 07:41 AM
Hello Jason Noftall,

This is Silverlight security restriction - you cannot reflect internal types and anonymous type are internal. So this is not supported scenario.

Let us know if you need more information.

All the best,
Hristo
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
ransems
Top achievements
Rank 1
answered on 04 May 2009, 11:49 AM
Thanks Hristo,

    I will do it the old fashioned way then.

-Jason
Tags
GridView
Asked by
ransems
Top achievements
Rank 1
Answers by
Hristo
Telerik team
ransems
Top achievements
Rank 1
Share this question
or