IndexOutOfRangeException when zero count given

Thread is closed for posting
2 posts, 0 answers
  1. Jan
    Jan avatar
    3 posts
    Member since:
    Jul 2014

    Posted 23 Jul 2014 Link to this post


    im using DataBoundListBox with VirtualizingDataCollection like in this demo code:


    var col = new VirtualizingDataCollection(0, 10);
    listBox.ItemsSource = col;

    At first, DataBoundListBox is showing "no data to display" as it should. But when i try to scroll down in this empty list, it gives me IndexOutOfRangeException.

       at Telerik.Windows.Data.VirtualizingDataCollection.ProcessIndexesToLoadInAttachedMode(RadVirtualizingDataControl control)
       at Telerik.Windows.Data.VirtualizingDataCollection.MakeDataRequestIfNeeded(Int32 pivotIndex)
       at Telerik.Windows.Data.VirtualizingDataCollection.OnAttachedListBox_ScrollStateChanged(RadVirtualizingDataControl sender, ScrollState oldState, ScrollState newState)
       at Telerik.Windows.Controls.RadVirtualizingDataControl.OnScrollStateChanged(ScrollState oldState, ScrollState newState)
       at Telerik.Windows.Controls.RadDataBoundListBox.OnScrollStateChanged(ScrollState oldState, ScrollState newState)
       at Telerik.Windows.Controls.RadVirtualizingDataControl.SetScrollState(ScrollState newState)
       at Telerik.Windows.Controls.RadVirtualizingDataControl.OnScrollingStates_StateChanging(Object sender, VisualStateChangedEventArgs e)
       at MS.Internal.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
       at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName)

    Thanks for your help,

  2. Tsvyatko
    Tsvyatko avatar
    858 posts

    Posted 28 Jul 2014 Link to this post

    Hi Jan,

    Thank you for reporting this issue. We have managed to isolate this issue and we will address it in our next official release for WP8. The issue occurs only if the collection is empty if you do not assign ItemsSource or add ItemsSource with data it will work as expected. (In order to avoid this issue you can use cocepts used in this article -


    P.S. I have update your telerik points accordingly.

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top