Note that there are some explanatory texts on larger screens.

plurals
  1. POUsing PagedCollectionView for four ListBoxes which support drag and drop = Index Errors when a filter is applied
    primarykey
    data
    text
    <p>I'm using Silverlight 3 and I have a dropdown menu which is used to filter four listboxes. These listboxes are individually wrapped within a ListBoxDragDropTarget (from the silverlight toolkit).</p> <p>The idea being that a user can see all available items or filter their view (all four listboxes) by a specific category.</p> <p>One listbox shows available items that can be assigned and then a user can drag from this list to one of the other three (which indicate what they want to do with the selected item. items can also be dragged across these three lists).</p> <p>Everything works well until you use a filter and then drag an item onto a listbox which is empty (as a result of the filter).</p> <p>The error I get is below and it is thrown when the item is being removed from the original list.</p> <pre> Specified argument was out of the range of valid values. Parameter name: index at System.Windows.Data.PagedCollectionView.GetItemAt(Int32 index) at System.Windows.Data.PagedCollectionView.get_IsCurrentInSync() at System.Windows.Data.PagedCollectionView.AdjustCurrencyForRemove(Int32 index) at System.Windows.Data.PagedCollectionView.ProcessRemoveEvent(Object removedItem, Boolean isReplace) at System.Windows.Data.PagedCollectionView.ProcessCollectionChanged (NotifyCollectionChangedEventArgs args) at System.Windows.Data.PagedCollectionView.b__0(Object sender, NotifyCollectionChangedEventArgs args) at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e) at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e) at System.Collections.ObjectModel.ObservableCollection`1.RemoveItem(Int32 index) at System.Collections.ObjectModel.Collection`1.RemoveAt(Int32 index) </pre> <p>Has anyone come across a similar error. Is PagedCollectionView (which is passed an observable collection) the wrong way of going about this?</p> <p>Any insight from someone who's come across this would be appreciated.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload