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

Getting Error when changing VirtualItemCount

2 Answers 104 Views
Data Virtualization
This is a migrated thread and some comments may be shown as answers.
Boots
Top achievements
Rank 1
Boots asked on 10 Sep 2012, 05:34 PM
Hello,

I"m having some troubles. I'm using this VirtualQueriableCollectionView with a RadCarousel. It's working well up until i change the VirtualItemCount in the ItemsLoading event. 

little more information:
We're using this VirtualQueriableCollectionView to load only a portion of the entire file. that part is working great.
On this control we have a TextBox that we use to search each column. unfortunately we're not using sql so we need to read each record and check the fields to see if any of them mach the TextBox text value. Doing it this way we wont know how many records we have in total so when we're finally done searching all of the records we will have a total count of records that match the textbox value and we'll need to change the VirtualItemCount in the ItemsLoading EventHandler. Now when i change the VirtualItemCount in my test wpf application it works just fine. But when i change it when it's hosted in WindowsForms (our main app is using winforms) I get "Collection was modified after the enumerator was instantiated.". 

I'm curious if you have any ideas of how i can work around this issue?

I hope that makes sense. If you need more information please let me know. I can hook you up with a test application too if needed.

Thanks Much,
~Boots

2 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 13 Sep 2012, 08:14 AM
Hi,

 Unfortunately we are out of ideas why this will work normally in WPF and will raise this exception when hosted in WinForms. Please open support ticket and send us small example project demonstrating your scenario and the exception. We will debug it locally and we will get back to you with more info.

Greetings,
Vlad
the Telerik team

Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.

0
Boots
Top achievements
Rank 1
answered on 13 Sep 2012, 05:42 PM
Hey Vlad,

I must apologize I didn't include the version that we're currently running. We're running version 2011.1.315.35. When I made the test app for you I used the latest version and did not hit the error. Sometime in the last year and a half it must have been fixed. We're going to check and see if we can just upgrade to the latest version of telerik.

Thanks again for looking into this,
~Boots
Tags
Data Virtualization
Asked by
Boots
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Boots
Top achievements
Rank 1
Share this question
or