Issue with the ItemSource - When trying to assign for the 2nd time, it is throwing exception

Hi,
I am trying to assign the data to ItemSource, 1st time ti is working fine again when i am getting a new Observable collection and try binding to the Item source it is throwing exception.

MY CODE:- dataGrid.ItemsSource = Vm.PoDataCollections;

Exception Message:
  at Syncfusion.SfDataGrid.XForms.CaptionSummaryRowControl.LayoutChildren (System.Double x, System.Double y, System.Double width, System.Double height) [0x0002f] in <a74d4daa2e9d4fbb83f3e9693ce0c478>:0 
  at Xamarin.Forms.Layout.UpdateChildrenLayout () [0x00158] in d:\a\1\s\Xamarin.Forms.Core\Layout.cs:266 
  at Xamarin.Forms.Layout.OnSizeAllocated (System.Double width, System.Double height) [0x0000f] in d:\a\1\s\Xamarin.Forms.Core\Layout.cs:224 
  at Xamarin.Forms.VisualElement.SizeAllocated (System.Double width, System.Double height) [0x00000] in d:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:792 
  at Xamarin.Forms.Layout.ForceLayout () [0x00000] in d:\a\1\s\Xamarin.Forms.Core\Layout.cs:125 
  at Syncfusion.SfDataGrid.XForms.VisualContainer.ArrangeRows () [0x00773] in <a74d4daa2e9d4fbb83f3e9693ce0c478>:0 
  at Syncfusion.SfDataGrid.XForms.VisualContainer.LayoutChildren (System.Double x, System.Double y, System.Double width, System.Double height) [0x00000] in <a74d4daa2e9d4fbb83f3e9693ce0c478>:0 
  at Xamarin.Forms.Layout.UpdateChildrenLayout () [0x00158] in d:\a\1\s\Xamarin.Forms.Core\Layout.cs:266 
  at Xamarin.Forms.Layout.OnSizeAllocated (System.Double width, System.Double height) [0x0000f] in d:\a\1\s\Xamarin.Forms.Core\Layout.cs:224 
  at Syncfusion.SfDataGrid.XForms.VisualContainer.OnSizeAllocated (System.Double width, System.Double height) [0x0041c] in <a74d4daa2e9d4fbb83f3e9693ce0c478>:0 
  at Xamarin.Forms.VisualElement.SizeAllocated (System.Double width, System.Double height) [0x00000] in d:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:792 
  at Xamarin.Forms.Layout.ForceLayout () [0x00000] in d:\a\1\s\Xamarin.Forms.Core\Layout.cs:125 
  at Syncfusion.SfDataGrid.XForms.AndroidScrollView.LayoutChildren (System.Double x, System.Double y, System.Double width, System.Double height) [0x00071] in <a74d4daa2e9d4fbb83f3e9693ce0c478>:0 
  at Xamarin.Forms.Layout.UpdateChildrenLayout () [0x00158] in d:\a\1\s\Xamarin.Forms.Core\Layout.cs:266 
  at Xamarin.Forms.Layout.OnSizeAllocated (System.Double width, System.Double height) [0x0000f] in d:\a\1\s\Xamarin.Forms.Core\Layout.cs:224 
  at Syncfusion.SfDataGrid.XForms.AndroidScrollView.OnSizeAllocated (System.Double width, System.Double height) [0x0000e] in <a74d4daa2e9d4fbb83f3e9693ce0c478>:0 
  at Xamarin.Forms.VisualElement.SizeAllocated (System.Double width, System.Double height) [0x00000] in d:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:792 
  at Xamarin.Forms.Layout.ForceLayout () [0x00000] in d:\a\1\s\Xamarin.Forms.Core\Layout.cs:125 
  at Syncfusion.SfDataGrid.XForms.VisualContainer.OnSizeAllocated (System.Double width, System.Double height) [0x00335] in <a74d4daa2e9d4fbb83f3e9693ce0c478>:0 
  at Xamarin.Forms.VisualElement.SizeAllocated (System.Double width, System.Double height) [0x00000] in d:\a\1\s\Xamarin.Forms.Core\VisualElement.cs:792 
  at Xamarin.Forms.Layout.ForceLayout () [0x00000] in d:\a\1\s\Xamarin.Forms.Core\Layout.cs:125 
  at Syncfusion.SfDataGrid.XForms.SfDataGrid.OnItemsSourceChanged (Xamarin.Forms.BindableObject bindable, System.Object oldValue, System.Object newValue) [0x00334] in <a74d4daa2e9d4fbb83f3e9693ce0c478>:0 
  at Xamarin.Forms.BindableObject.SetValueActual (Xamarin.Forms.BindableProperty property, Xamarin.Forms.BindableObject+BindablePropertyContext context, System.Object value, System.Boolean currentlyApplying, Xamarin.Forms.Internals.SetValueFlags attributes, System.Boolean silent) [0x00120] in d:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:463 
  at Xamarin.Forms.BindableObject.SetValueCore (Xamarin.Forms.BindableProperty property, System.Object value, Xamarin.Forms.Internals.SetValueFlags attributes, Xamarin.Forms.BindableObject+SetValuePrivateFlags privateAttributes) [0x00173] in d:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:397 
  at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindableProperty property, System.Object value, System.Boolean fromStyle, System.Boolean checkAccess) [0x00042] in d:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:334 
  at Xamarin.Forms.BindableObject.SetValue (Xamarin.Forms.BindableProperty property, System.Object value) [0x00000] in d:\a\1\s\Xamarin.Forms.Core\BindableObject.cs:311 
  at Syncfusion.SfDataGrid.XForms.SfDataGrid.set_ItemsSource (System.Object value) [0x00010] in <a74d4daa2e9d4fbb83f3e9693ce0c478>:0 
  at YPS.MainPage.Paging () [0x0065d] in D:\YPS\Mobile\YPS_SVN\YPS\YPS\MainPage.xaml.cs:386 

Thank You.


1 Reply

KK Karthikraja Kalaimani Syncfusion Team May 29, 2020 01:13 PM UTC

Hi CodeWork,

We have already fixed this issue internally, so could you please check with latest version of SfDataGrid and let us know whether the issue is resolved or not.

Regards,
Karthik Raja 


Loader.
Up arrow icon