Completed
Last Updated: 24 Jul 2018 08:06 by Simone
ADMIN
Georgi
Created on: 21 May 2018 05:16
Category: ListView
Type: Bug Report
2
ListView: [Android] Exception is thrown when loading items via LoadOnDemand in Grid layout
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
  at System.ThrowHelper.ThrowArgumentOutOfRange_IndexException () [0x0000c] in <f32579baafc1404fa37ba3ec1abdc0bd>:0 
  at System.Collections.Generic.List`1[T].get_Item (System.Int32 index) [0x00009] in <f32579baafc1404fa37ba3ec1abdc0bd>:0 
  at Telerik.XamarinForms.DataControls.ListView.ListViewDataAdapter.GetItem (System.Int32 index) [0x0001b] in <fcf5d4a482ed442f8a8bf1f6d4b51a9e>:0 
  at Telerik.XamarinForms.DataControlsRenderer.Android.ListViewDataSource.ItemAtIndex (System.Int32 index) [0x00000] in <fcf5d4a482ed442f8a8bf1f6d4b51a9e>:0 
  at Telerik.XamarinForms.DataControlsRenderer.Android.RadListViewDataSourceAdapter.IsGroupHeader (System.Int32 position) [0x00006] in <fcf5d4a482ed442f8a8bf1f6d4b51a9e>:0 
  at Telerik.XamarinForms.DataControlsRenderer.Android.ManagedSpanSizeLookup.GetSpanSize (System.Int32 position) [0x00014] in <fcf5d4a482ed442f8a8bf1f6d4b51a9e>:0 
  at Android.Support.V7.Widget.GridLayoutManager+SpanSizeLookup.n_GetSpanSize_I (System.IntPtr jnienv, System.IntPtr native__this, System.Int32 position) [0x00008] in <1c3b474ba0bc45cba6ec33f4b4b4b99a>:0 
  at (wrapper dynamic-method) System.Object.7c4a1162-c270-469c-9edd-2e3fb764422a(intptr,intptr,int)


Available in the 2018 R2 SP release.
3 comments
Simone
Posted on: 24 Jul 2018 08:06
Hello Yana, 
It was a problem that raise from my code (I didn't handle the IsLoadOnDemandActive when there were no more elements from backend).
Thank you,

Simone
ADMIN
Yana
Posted on: 24 Jul 2018 07:55
Hi Simone,

I didn't manage to reproduce the described behavior, so I'd ask you to open a support ticket and provide more details/sample code there, so we to be able to research it further.

Regards,
Yana
Simone
Posted on: 04 Jul 2018 08:59
I've update to the last version (2018 R2 SP) and now I do not receive the error...but...now when I scroll down it never stop loading from backend...