Getting Error when changing VirtualItemCount

3 posts, 0 answers
  1. Boots
    Boots avatar
    81 posts
    Member since:
    Dec 2008

    Posted 10 Sep 2012 Link to this post


    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,
  2. Vlad
    Vlad avatar
    11100 posts

    Posted 13 Sep 2012 Link to this post


     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.

    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.

  3. UI for WPF is Visual Studio 2017 Ready
  4. Boots
    Boots avatar
    81 posts
    Member since:
    Dec 2008

    Posted 13 Sep 2012 Link to this post

    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,
Back to Top