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

Anonymous type binding

2 Answers 66 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Young-Lae Chung
Top achievements
Rank 1
Young-Lae Chung asked on 12 Nov 2010, 07:53 AM

When I used a radchart control version of 2009.31314.1030 in my silverlight project, It was able to bind anonymous type to control by adding following code to AssemblyInfo.cs file. 

* Add to Asseblyinfo.cs
 
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("System.Windows")] 
 
 
* My bindng code snipet (It worked well)
 
var mtbfsummary = (from kpisummary in kpisummaryresult
            orderby kpisummary.ExtractDate descending
            select new { XValue = kpisummary.ExtractDate, YValue = kpisummary.MTBF }).Take(7);
 
this.TotalRateNormalChart.ItemsSource = totalratesummary;


But After I upgraded control to upper version - version : 2010.1.603.1030 - , then it does not work any more.

Why does it happen?
Is there a way to bind anonymous type to chart control?

 
  

2 Answers, 1 is accepted

Sort by
0
Young-Lae Chung
Top achievements
Rank 1
answered on 17 Nov 2010, 04:18 AM
Nobody in here?? 
0
Velin
Telerik team
answered on 17 Nov 2010, 05:40 PM
Hello Young-Lae Chung,

Indeed I should confirm that with the version you have used so far, your solution has worked well because simple reflection was used to fetch the value from the data objects. The current version offers much more powerful data binding solution by using a Linq based data engine, but unfortunately this scenario is not supported any more.

We would recommend you to data bind the control to some custom type of yours.
Please, accept our apologies for the inconvenience.

Best wishes,
Ryan
the Telerik team
See What's New in RadControls for Silverlight in Q3 2010 on Tuesday, November 16, 2010 11:00 AM - 12:00 PM EST or 10:00 PM - 11:00 PM EST: Register here>>
Tags
Chart
Asked by
Young-Lae Chung
Top achievements
Rank 1
Answers by
Young-Lae Chung
Top achievements
Rank 1
Velin
Telerik team
Share this question
or