Error with Latest Release: Cannot change or check the contents or Current position of the QueryableCollectionView while Refresh is being deferred.

14 posts, 1 answers
  1. Kathleen
    Kathleen avatar
    55 posts
    Member since:
    Jun 2009

    Posted 18 Jul 2010 Link to this post

    We wrote a custom format columns dialog that allows users to add/hide columns.

    This code functioned prior to our upgrade to the latest release.  Was it a new issue introduced?

    using (this.RadGridView.DeferRefresh())  Getting an error with latest release of controls:
                {
                this.RadGridView.SortDescriptors.Clear();
                this.RadGridView.SortDescriptors.Add(new SortDescriptor()
                                                         {
                                                             Member = Common.sort.PropertyName,
                                                             SortDirection = Common.sort.Direction
                                                         });
      
                foreach (var column in this.RadGridView.Columns)
                {
                    if (column.Header.ToString() != string.Empty && column.Header.ToString() != CommonStringLibrary.HeaderName)
                        column.IsVisible = false;
                }
      
                int index = 1;
                foreach (var item in this.Visibles)
                {
                    var temp = item; // work around closure issue.
                    var column = this.RadGridView.Columns.FirstOrDefault<GridViewColumn>(c => c.UniqueName == temp.Id);
                    if (column == null)
                        throw new ArgumentException(string.Format("Unable to find a column with UniqueName {0}.",
                                                                  temp.Id));
      
                    column.DisplayIndex = index++;  <---- Error is here.
                    column.IsVisible = true;
      
      
                }
            }
  2. Answer
    Tsvyatko
    Admin
    Tsvyatko avatar
    863 posts

    Posted 20 Jul 2010 Link to this post

    Hello Kathleen,

    I have created sample application based on the code snippet posted and I am able to reproduce the problem. I have logged this issue in our PITS system and we will investigate this further in order to resolve it.
    Currently, I can suggest the following workaround - use DeferRefresh only for SortDescriptors' changes since it does not benefit columns' change. (You can check the attachment as reference).



    Regards,
    Tsvyatko
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Francois Germain
    Francois Germain avatar
    1 posts
    Member since:
    Apr 2010

    Posted 22 Jul 2010 Link to this post

    I confirm this is a problem that I also didn't have before in a different area of the same codebase.  Removing the DeferRefresh code worked.
  4. Fabrice Marguerie
    Fabrice Marguerie avatar
    9 posts
    Member since:
    May 2010

    Posted 21 Aug 2010 Link to this post

    Same here. I removed the call to DeferRefresh() and the exception went away.
  5. Tim
    Tim avatar
    87 posts
    Member since:
    Aug 2008

    Posted 17 Sep 2010 Link to this post

    Same thing here (on 2010.2 code base)
  6. Mohan
    Mohan avatar
    8 posts
    Member since:
    Aug 2017

    Posted 15 Jun in reply to Tsvyatko Link to this post

    Hi Tsvyatko,

    Is this issue solved? I'm using QueryableDataServiceCollectionView with autoload set to true. Now, I am using DeferRefresh() to defer the irrelevant web requests that go out  when I make any changes on RadGridView (i.e changing sort, filter descriptors and column index).

  7. Stefan
    Admin
    Stefan avatar
    1024 posts

    Posted 19 Jun Link to this post

    Hello Mohan,

    I tested the behavior of the control with the latest version and it seems to be working as expected. Can you please give it a try on your end as well?

    Regards,
    Stefan
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  8. Mohan
    Mohan avatar
    8 posts
    Member since:
    Aug 2017

    Posted 21 Jun in reply to Stefan Link to this post

    Is "2018.1.220.45" the latest version that you have tested, if not which is the latest one?
  9. Stefan
    Admin
    Stefan avatar
    1024 posts

    Posted 26 Jun Link to this post

    Hello Mohan,

    I tested with R2 2018 version(2018.2.515) and with the latest R2 2018 SP1 one(2018.2.620). The version you are using corresponds to R1 2018 SP2 version. you can take a look at the Release History for further reference. Nevertheless, can you please clarify how the control behaves on your end with the version you are using? Is the issue still reproducible?

    Regards,
    Stefan
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  10. Mohan
    Mohan avatar
    8 posts
    Member since:
    Aug 2017

    Posted 26 Jun in reply to Stefan Link to this post

    Hi Stefan,

    Yes, I'm able to reproduce the issue on R1 2018 SP2 version.

    Thanks,

    Mohan

  11. Stefan
    Admin
    Stefan avatar
    1024 posts

    Posted 28 Jun Link to this post

    Hi Mohan,

    I used the sample application provided by my colleague but was not able to replicate any exception when using the DeferRefresh method. Would it be possible for you to modify in a way that reproduces the problem, open a new support thread and attach the sample in it? We will be happy to assist you further.

    Thanks in advance for your cooperation.

    Regards,
    Stefan
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  12. Mohan
    Mohan avatar
    8 posts
    Member since:
    Aug 2017

    Posted 03 Jul in reply to Stefan Link to this post

    Hi Stefan,

    I have opened a new thread and attached a sample project in which I'm able to reproduce the error.

    FYI, 

    https://www.telerik.com/forums/cannot-change-or-check-the-contents-or-current-position-of-the-queryablecollectionview-while-refresh-is-being-deferred#9p9vygNyM0et96zabsqvrQ

    Thanks,

    Mohan.

  13. Stefan
    Admin
    Stefan avatar
    1024 posts

    Posted 05 Jul Link to this post

    Hello Mohan,

    Thank you for your cooperation.

    I already responded you in the referred forum. I would like to clarify that I referred to opening a support thread, rather than a forum one as our ticketing system allows archives to be attached to support threads only. The process of opening a support ticket is discussed in the How To Submit a Support Ticket blog post.

    Regards,
    Stefan
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  14. Stefan
    Admin
    Stefan avatar
    1024 posts

    Posted 25 Jul Link to this post

    Hello Mohan,

    I am pasting my reply from the support ticket you opened regarding this issue, so it is available for the community.

    After reviewing the case with my colleagues it seems that the issue is on our end. Thus, I have logged it in our bug tracking system: Setting the DisplayIndex of a column when the refresh is deffered results in an InvalidOperationException.

    We will do our best to provide the fix for the issue with one of the next internal builds.


    Regards,
    Stefan
    Progress Telerik
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top