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

Binding exception

6 Answers 128 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Adiel
Top achievements
Rank 2
Adiel asked on 08 Apr 2010, 02:00 PM
Hi
I'm trying to populate a char with StackedBar1003DSeriesDefinition series mapping with data from server.
The application crashe with exception.

The data is list of type:
 public class StackBarModel  
    {  
        public object XValue { getset; }  
        public int[] YValues { getset; }  
    } 
the list contain one item:
XValue = {06/04/2010 00:00:00} (DateTime)
YValue = 1,2,2,0,0

The binding  is:

 <Charting:SeriesMapping.ItemMappings> 
                        <Charting:ItemMapping DataPointMember="XValue" 
                                              FieldName="XValue" /> 
                        <Charting:ItemMapping DataPointMember="YValue" 
                                              FieldName="YValue" /> 
 </Charting:SeriesMapping.ItemMappings> 

The error is:

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; OfficeLiveConnector.1.4; OfficeLivePatch.1.3; .NET4.0C; .NET4.0E)
Timestamp: Thu, 8 Apr 2010 12:58:15 UTC

Message: Unhandled Error in Silverlight Application
Code: 4004   
Category: ManagedRuntimeError      
Message: System.NullReferenceException: Object reference not set to an instance of an object.
   at Telerik.Windows.Controls.Charting.DataBindingHelper.AssignMappingFieldTypes(QueryableCollectionView dataEngine, SeriesMapping seriesMapping)
   at Telerik.Windows.Controls.Charting.DataBindingHelper.ProcessNoGrouping(SeriesMapping seriesMapping, QueryableCollectionView dataEngine, Int32 samplingThreshold, ZoomScrollSettings zoomScrollSettings, ISeriesDefinition defaultSeriesDefinition, AxisRangeState axisXRangeState, Int32 seriesCount)
   at Telerik.Windows.Controls.Charting.DataBindingHelper.ProcessMapping(SeriesMapping seriesMapping, QueryableCollectionView dataEngine, Int32 samplingThreshold, ZoomScrollSettings zoomScrollSettings, ISeriesDefinition defaultSeriesDefinition, AxisRangeState axisXRangeState, Int32 seriesCount)
   at Telerik.Windows.Controls.Charting.DataBindingHelper.ProcessMappings(SeriesMappingCollection seriesMappings, QueryableCollectionView dataEngine, Int32 samplingThreshold, ZoomScrollSettings zoomScrollSettings, ISeriesDefinition defaultSeriesDefinition, AxisRangeState axisXRangeState)
   at Telerik.Windows.Controls.Charting.DataBindingHelper.GenerateDataSeries(Object originalData, SeriesMappingCollection seriesMappings, ISeriesDefinition defaultSeriesDefinition, ChartFilterDescriptorCollection globalFilterDescriptors, ChartSortDescriptorCollection globalSortDescriptors, SamplingSettings samplingSettings, ZoomScrollSettings zoomScrollSettings, AxisRangeState axisXRangeState)
   at Telerik.Windows.Controls.RadChart.GenerateDataSeries(Object originalData, SeriesMappingCollection seriesMappings, ChartArea chartArea)
   at Telerik.Windows.Controls.RadChart.GenerateDataSeries(Object originalData)
   at Telerik.Windows.Controls.RadChart.Rebind(Object originalData)
   at Telerik.Windows.Controls.RadChart.Rebind()
   at Telerik.Windows.Controls.RadChart.OnApplyTemplate()
   at System.Windows.FrameworkElement.OnApplyTemplate(IntPtr nativeTarget)    

Line: 56
Char: 13
Code: 0

 
Thanks
Adiel

6 Answers, 1 is accepted

Sort by
0
Ves
Telerik team
answered on 13 Apr 2010, 07:28 AM
Hi Adiel,

Our developers have already addressed this problem. Please, download the latest internal build and give it a try.

Best regards,
Ves
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Kerwin Smith
Top achievements
Rank 1
answered on 26 Apr 2010, 09:10 PM

I'm getting a similar error with the latest build : 2010.1.422.1030

    public class HistoricalChartData  
    {  
        public string Quarter { getset; }  
        public double Value1 { getset; }  
        public double Value2 { getset; }  
    } 

System.NullReferenceException: Object reference not set to an instance of an object.

at Telerik.Windows.Controls.Charting.DataBindingHelper.AssignMappingFieldTypes(QueryableCollectionView dataEngine, SeriesMapping seriesMapping)
at Telerik.Windows.Controls.Charting.DataBindingHelper.ProcessNoGrouping(SeriesMapping seriesMapping, QueryableCollectionView dataEngine, Int32 samplingThreshold, ZoomScrollSettings zoomScrollSettings, ISeriesDefinition defaultSeriesDefinition, AxisRangeState axisXRangeState, Int32 seriesCount)
at Telerik.Windows.Controls.Charting.DataBindingHelper.ProcessMapping(SeriesMapping seriesMapping, QueryableCollectionView dataEngine, Int32 samplingThreshold, ZoomScrollSettings zoomScrollSettings, ISeriesDefinition defaultSeriesDefinition, AxisRangeState axisXRangeState, Int32 seriesCount)
at Telerik.Windows.Controls.Charting.DataBindingHelper.ProcessMappings(SeriesMappingCollection seriesMappings, QueryableCollectionView dataEngine, Int32 samplingThreshold, ZoomScrollSettings zoomScrollSettings, ISeriesDefinition defaultSeriesDefinition, AxisRangeState axisXRangeState)
at Telerik.Windows.Controls.Charting.DataBindingHelper.GenerateDataSeries(Object originalData, SeriesMappingCollection seriesMappings, ISeriesDefinition defaultSeriesDefinition, ChartFilterDescriptorCollection globalFilterDescriptors, ChartSortDescriptorCollection globalSortDescriptors, SamplingSettings samplingSettings, ZoomScrollSettings zoomScrollSettings, AxisRangeState axisXRangeState)
at Telerik.Windows.Controls.RadChart.GenerateDataSeries(Object originalData, SeriesMappingCollection seriesMappings, ChartArea chartArea)
at Telerik.Windows.Controls.RadChart.GenerateDataSeries(Object originalData)
at Telerik.Windows.Controls.RadChart.Rebind(Object originalData)
at Telerik.Windows.Controls.RadChart.ItemsSourcePropertyChanged(DependencyObject target, DependencyPropertyChangedEventArgs args)
at Telerik.Windows.PropertyMetadata.<>c__DisplayClass1.<Create>b__0(DependencyObject d, DependencyPropertyChangedEventArgs e)
at System.Windows.DependencyObject.RaisePropertyChangeNotifications(DependencyProperty dp, Object newValue, Object oldValue)
at System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value, Boolean allowReadOnlySet, Boolean isSetByStyle, Boolean isSetByBuiltInStyle, PropertyInvalidationReason reason)
at System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value)
at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
at Telerik.Windows.Controls.RadChart.set_ItemsSource(Object value)
at IndustryReport.Models.HistoricalChart.LoadHistoricalRateChartCompleted(LoadOperation`1 Entity)}
0
Paulius Putna
Top achievements
Rank 1
answered on 26 Apr 2010, 10:41 PM
0
Ves
Telerik team
answered on 29 Apr 2010, 12:04 PM
Hi everyone,

Can you send us a small example reproducing the error so that we can investigate it? Thanks.

Best regards,
Ves
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Duncan Bayne
Top achievements
Rank 1
answered on 21 May 2010, 04:32 AM
I have been able to consistently reproduce the problem - although I'm not sure whether it's a bug, or whether I'm doing something wrong.

I have submitted support ticket 311978 which contains a VS 2010 solution that reproduces the problem.  You can also download the VS 2010 solution from my blog:

http://www.fluidscape.co.nz/files/TelerikBug1.zip

0
Ves
Telerik team
answered on 26 May 2010, 12:14 PM
Hello Duncan Bayne,

Please, find below my answer, provided in the support ticket you have started:

This has been fixed by our developers. Please, download and use the latest internal build - version 2010.1.0521.1040. Please, mind the last number - for Silverlight 4 it should be 1040, the 1030 assemblies are built against Silverlight 3.

Best regards,
Ves
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Chart
Asked by
Adiel
Top achievements
Rank 2
Answers by
Ves
Telerik team
Kerwin Smith
Top achievements
Rank 1
Paulius Putna
Top achievements
Rank 1
Duncan Bayne
Top achievements
Rank 1
Share this question
or