This question is locked. New answers and comments are not allowed.
Dear All,
I have integrate the aggregates functions in my gridview and it was working fine, before I just added the grid into a radpane.
This radpane is created using RegionAdapter to use Prism 4 regions inside radpanegroup.
It works fine for sometime and suddenly throws an exception, I sometimes undock/dock the radpane.
here is the complete error:
and this how I defined the XAML for the aggregate function:
Any help on this !!
I have integrate the aggregates functions in my gridview and it was working fine, before I just added the grid into a radpane.
This radpane is created using RegionAdapter to use Prism 4 regions inside radpanegroup.
It works fine for sometime and suddenly throws an exception, I sometimes undock/dock the radpane.
here is the complete error:
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.GridView.AggregatesToGroupFooterAggregatesConverter.<>c__DisplayClass4.<
Convert
>b__1(AggregateResult f)
at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
at MS.Internal.EnumerableCollectionView.LoadSnapshotCore(IEnumerable source)
at MS.Internal.EnumerableCollectionView.LoadSnapshot(IEnumerable source)
at MS.Internal.EnumerableCollectionView.RefreshOverride()
at System.Windows.Data.CollectionView.Refresh()
at Telerik.Windows.Controls.GridView.GridViewFooterCell.AggregateResults_CollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
at Telerik.Windows.Data.RadObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
at Telerik.Windows.Data.RadObservableCollection`1.ResumeNotifications()
at Telerik.Windows.Controls.GridView.GridViewDataControl.CreateAggregateResults()
at Telerik.Windows.Controls.GridView.GridViewDataControl.CalculateAggregates()
at Telerik.Windows.Controls.GridView.GridViewDataControl.OnItemsCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
at Telerik.Windows.Data.DataItemCollection.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
at Telerik.Windows.Data.DataItemCollection.OnCollectionViewCollectionChanged(NotifyCollectionChangedEventArgs e)
at Telerik.Windows.Data.DataItemCollection.Telerik.Windows.Data.IWeakEventListener<
System.Collections.Specialized.NotifyCollectionChangedEventArgs
>.ReceiveWeakEvent(Object sender, NotifyCollectionChangedEventArgs e)
at Telerik.Windows.Data.WeakEvent.WeakListener`1.Handler(Object sender, TArgs args)
at Telerik.Windows.Data.QueryableCollectionView.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
at Telerik.Windows.Data.QueryableCollectionView.RefreshOverride()
at Telerik.Windows.Data.QueryableCollectionView.RefreshInternal()
at Telerik.Windows.Data.QueryableCollectionView.RefreshOrDefer()
at Telerik.Windows.Data.QueryableCollectionView.ProcessSynchronousCollectionChanged(NotifyCollectionChangedEventArgs args)
at Telerik.Windows.Data.QueryableCollectionView.ProcessCollectionChanged(NotifyCollectionChangedEventArgs args)
at Telerik.Windows.Data.QueryableCollectionView.OnSourceCollectionChanged(Object sender, NotifyCollectionChangedEventArgs args)
at Telerik.Windows.Data.QueryableCollectionView.Telerik.Windows.Data.IWeakEventListener<
System.Collections.Specialized.NotifyCollectionChangedEventArgs
>.ReceiveWeakEvent(Object sender, NotifyCollectionChangedEventArgs args)
at Telerik.Windows.Data.WeakEvent.WeakListener`1.Handler(Object sender, TArgs args)
at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
at Telerik.Windows.Data.RadObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
at Telerik.Windows.Data.ObservableItemCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
at Telerik.Windows.Controls.DomainServices.DomainServiceCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
at Telerik.Windows.Data.RadObservableCollection`1.ResumeNotifications()
at Telerik.Windows.Controls.DomainServices.DomainServiceCollection`1.OnLoadOperationCompleted(LoadOperation`1 loadOperation)
at System.ServiceModel.DomainServices.Client.DomainContext.<>c__DisplayClass13`1.<
Load
>b__11(LoadOperation lo)
at System.ServiceModel.DomainServices.Client.LoadOperation.<>c__DisplayClass4`1.<
Create
>b__0(LoadOperation`1 arg)
at System.ServiceModel.DomainServices.Client.LoadOperation`1.InvokeCompleteAction()
at System.ServiceModel.DomainServices.Client.OperationBase.Complete(Object result)
at System.ServiceModel.DomainServices.Client.LoadOperation.Complete(DomainClientResult result)
at System.ServiceModel.DomainServices.Client.DomainContext.CompleteLoad(IAsyncResult asyncResult)
at System.ServiceModel.DomainServices.Client.DomainContext.<>c__DisplayClass1b.<
Load
>b__17(Object )
Line: 54
Char: 13
Code: 0
and this how I defined the XAML for the aggregate function:
<
telerik:GridViewDataColumn
Header
=
"Total Credit"
DataMemberBinding
=
"{Binding total_credit}"
DataFormatString
=
"{}{0:n}"
IsReadOnly
=
"{Binding IsEnabled}"
>
<
telerik:GridViewDataColumn.AggregateFunctions
>
<
telerik:SumFunction
Caption
=
""
ResultFormatString
=
"{}{0:n}"
/>
</
telerik:GridViewDataColumn.AggregateFunctions
>
</
telerik:GridViewDataColumn
>