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

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

13 Answers 254 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Kathleen
Top achievements
Rank 1
Kathleen asked on 19 Jul 2010, 01:07 AM
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;
  
  
            }
        }

13 Answers, 1 is accepted

Sort by
0
Accepted
Tsvyatko
Telerik team
answered on 20 Jul 2010, 01:40 PM
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
0
Francois Germain
Top achievements
Rank 1
answered on 23 Jul 2010, 03:10 AM
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.
0
Fabrice Marguerie
Top achievements
Rank 1
answered on 21 Aug 2010, 10:43 PM
Same here. I removed the call to DeferRefresh() and the exception went away.
0
Tim
Top achievements
Rank 1
answered on 18 Sep 2010, 12:37 AM
Same thing here (on 2010.2 code base)
0
Mohan
Top achievements
Rank 1
answered on 15 Jun 2018, 09:29 AM

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).

0
Stefan
Telerik team
answered on 19 Jun 2018, 02:24 PM
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.
0
Mohan
Top achievements
Rank 1
answered on 21 Jun 2018, 11:10 AM
Is "2018.1.220.45" the latest version that you have tested, if not which is the latest one?
0
Stefan
Telerik team
answered on 26 Jun 2018, 09:05 AM
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.
0
Mohan
Top achievements
Rank 1
answered on 26 Jun 2018, 09:53 AM

Hi Stefan,

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

Thanks,

Mohan

0
Stefan
Telerik team
answered on 28 Jun 2018, 01:00 PM
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.
0
Mohan
Top achievements
Rank 1
answered on 03 Jul 2018, 09:49 AM

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.

0
Stefan
Telerik team
answered on 05 Jul 2018, 02:42 PM
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.
0
Stefan
Telerik team
answered on 25 Jul 2018, 03:07 PM
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.
Tags
GridView
Asked by
Kathleen
Top achievements
Rank 1
Answers by
Tsvyatko
Telerik team
Francois Germain
Top achievements
Rank 1
Fabrice Marguerie
Top achievements
Rank 1
Tim
Top achievements
Rank 1
Mohan
Top achievements
Rank 1
Stefan
Telerik team
Share this question
or