This is a migrated thread and some comments may be shown as answers.

Listbox with Virtualizing Data Collection throws Exception when changing count property

3 Answers 86 Views
DataBoundListBox
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Mike
Top achievements
Rank 2
Mike asked on 08 Aug 2011, 08:59 AM
Hi!
i have a DataBoundListBox with a Virtualizing Data Collection, on initial Loading, everything works fine. But when i try to change the count property of the Virtualizing Data Collection to a vlaue lower then the old one, i get an IndexOutOfRangeException.

Is this a bug?

Here is the StackTrace:   at Telerik.Windows.Data.VirtualizingDataCollection.IsIndexLoaded(Int32 index)
   at Telerik.Windows.Data.VirtualizingDataCollection.GetItemAt(Int32 index)
   at Telerik.Windows.Data.VirtualizingDataCollection.get_Item(Int32 index)
   at Telerik.Windows.Data.RadListSource.RequestDataForItem(IDataSourceItem item)
   at Telerik.Windows.Data.DataSourceItem.get_Value()
   at Telerik.Windows.Data.RadListSource.RemoveItems(NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Data.RadListSource.SourceCollectionChangedOverride(NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Data.RadListSource.OnSourceCollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
   at Telerik.Windows.Data.VirtualizingDataCollection.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
   at Telerik.Windows.Data.VirtualizingDataCollection.OnCountChanged(Int32 oldCount, Int32 newCount)
   at Telerik.Windows.Data.VirtualizingDataCollection.set_Count(Int32 value)
   at SigiNxMobile.MainViewModel.service_CountCustomersCompleted(Object sender, CountCustomersCompletedEventArgs e)
   at SigiNxMobile.SigiNXServiceReference.SigiNXServiceClient.OnCountCustomersCompleted(Object state)
   at System.Reflection.RuntimeMethodInfo.InternalInvoke(RuntimeMethodInfo rtmi, Object obj, BindingFlags invokeAttr, Binder binder, Object parameters, CultureInfo culture, Boolean isBinderDefault, Assembly caller, Boolean verifyAccess, StackCrawlMark& stackMark)
   at System.Reflection.RuntimeMethodInfo.InternalInvoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, StackCrawlMark& stackMark)
   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at System.Delegate.DynamicInvokeOne(Object[] args)
   at System.MulticastDelegate.DynamicInvokeImpl(Object[] args)
   at System.Delegate.DynamicInvoke(Object[] args)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.Dispatch(DispatcherPriority priority)
   at System.Windows.Threading.Dispatcher.OnInvoke(Object context)
   at System.Windows.Hosting.CallbackCookie.Invoke(Object[] args)
   at System.Windows.Hosting.DelegateWrapper.InternalInvoke(Object[] args)
   at System.Windows.RuntimeHost.ManagedHost.InvokeDelegate(IntPtr pHandle, Int32 nParamCount, ScriptParam[] pParams, ScriptParam& pResult)

3 Answers, 1 is accepted

Sort by
0
Deyan
Telerik team
answered on 08 Aug 2011, 03:11 PM
Hello Michael,

Thanks for writing and for reporting this issue.

We are currently not aware of any issues in VirtualizingDataCollection and you are the first to report one. Since based on the stack trace we can only understand where the issue occured, but not how, we would kindly like to ask you to prepare a small Windows Phone 7 app that we can use to reproduce it and send it to us so that we can investigate.

Please note that in order to be able to upload an app, you will have to open a new support ticket.

Thanks for your time.

We look forward to receiving the requested details.

Regards,
Deyan
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

0
Mike
Top achievements
Rank 2
answered on 08 Aug 2011, 07:32 PM
Thanks for your quick response, i just submitted the demo project in an new support ticket!
looking forward for your answer!
0
Accepted
Deyan
Telerik team
answered on 09 Aug 2011, 08:20 AM
Hello Michael,

Thanks for sending us your project.

We have managed to reproduce the issue and will provide a fix for it in our next official release. In the meantime, you can use the following workaround:

this.uxListBox.BeginUpdate();
data.Count = 3;
this.uxListBox.EndUpdate(true);

Please refer to the support ticket you have opened for further details.

Do not hesitate to get back to us in case you have further questions or need assistance.

Regards,
Deyan
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

Tags
DataBoundListBox
Asked by
Mike
Top achievements
Rank 2
Answers by
Deyan
Telerik team
Mike
Top achievements
Rank 2
Share this question
or