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

Cannot change or check the contents or Current position of the QueryableCollectionView while Refresh is being deferred.

9 Answers 409 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Mohan
Top achievements
Rank 1
Mohan asked on 03 Jul 2018, 09:44 AM

Hi,

I'm able to reproduce this error "Cannot change or check the contents or Current position of the QueryableCollectionView while Refresh is being deferred" even on the latest release. The exception is caught only if we use exceptional handling (try, catch).  

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

My problem here occurs when we are trying to change the index of the gridview column. The process is exiting from the PersistenceManager.Load() operation (because of the exception) and skipping the remaining part of execution. Henceforth, it also exits the DeferRefresh() which in turn sends out an irrelevant query to the database, overriding my gridview with different data.

In the sample project that I'm attaching, I couldn't reproduce the same situation by using QueryableDataServiceCollectionView as it needs a DataServiceContext and DataServiceQuery. 

Please provide any fix for this exception.

Here is the link to my sample project: 

https://hexmet-my.sharepoint.com/:u:/g/personal/shravya_kusuma_hexagon_com/EXier5S_YydBr9eljF9NN64BCFM_TUqJQ73F5ojPxDM15Q

Thanks,

Mohan.

9 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 05 Jul 2018, 02:39 PM
Hello Mohan,

Thank you for the attached project.

I tested it on my end and I am still not able to replicate the problem. Attached you can find a short video as a demonstration. Am I missing anything? Are there some additional steps that I need to take to reproduce the exception?

Regards,
Stefan
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
Mohan
Top achievements
Rank 1
answered on 09 Jul 2018, 05:35 AM

Hi Stefan,

The issue is observed when we reorder the columns and then click restore defaults to load the default ColumnIndex which is saved in the settings file.

Steps to reproduce:

Change the column order by dragging the column to different position and click on restore defaults button. If you are unable to reproduce the issue even then, delete the settings file that we are saving to the drive and try it again.

Thanks,

Mohan.

0
Stefan
Telerik team
answered on 11 Jul 2018, 03:45 PM
Hi Mohan,

Thank you for this clarification.

I managed to replicate the issue with R3 2017 version. It seems that it is somehow related to the DisplayIndex property of GridViewColumn. There were some optimizations regarding it which we recently reverted. So, after testing with the latest R2 2018 SP1 version I can confirm that the exception is no longer raised. Can you please double check and confirm that you are using the latest binaries on your end?

Regards,
Stefan
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
Mohan
Top achievements
Rank 1
answered on 12 Jul 2018, 03:34 AM

Hi Stefan,

Yes, I have used the latest telerik version R2 2018 SP1 (2018.2.620) and I'm able to reproduce issue.

Thanks,

Mohan.

0
Stefan
Telerik team
answered on 16 Jul 2018, 12:15 PM
Hi Mohan,

I am sorry to hear that you are experiencing the same issue with the R2 2018 SP1 version as well.

Please note, that in order to be able to provide an adequate assistance I need to replicate the issue on my end with this assemblies version as well. I have attached the sample application provided by you with 2018.2.620 binaries in which the exception is not raised. Can you please test it on your end as well? In case I am missing something, please modify the sample so that the exception is reproduced and send it to us via new support ticket. Also, just for the test, can you please try removing the DisplayIndex property persistance on your end? Does this make any difference?

Thank you in advance for your cooperation.

Regards,
Stefan
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
Mohan
Top achievements
Rank 1
answered on 17 Jul 2018, 07:41 AM

Hi Stefan,

I'm able to replicate the issue with the application you have sent with 2018.2.620 binaries. Please find the video. I'll also raise a new support ticket.

However, we are using 2017.2.614.45 binaries. Will it be possible for you to fix the issue in that version?

And, we can't remove the DisplayIndex property as it is the property which drives the saving and restoring of column re-order functionality. The issue is reproducible only with the DisplayIndex property. The exception is raised by DisplayIndex property itself.

Thanks,

Mohan.

0
Stefan
Telerik team
answered on 25 Jul 2018, 03:05 PM
Hi Mohan,

I already replied you in the support ticket you opened regarding this case. I will, however, paste my reply here as well so it is available to 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
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
John
Top achievements
Rank 1
answered on 10 Jun 2019, 05:49 PM

We are running a very old (5+ years) version of the Telerik GridView control that we have heavily modified. One of our QA testers entered a bug for it recently with this same error.

 

Would it be possible to understand the nature of where the fix was made for this issue so that we can make the same change in our codebase?

0
Vladimir Stoyanov
Telerik team
answered on 13 Jun 2019, 01:30 PM
Hello John,

I investigated the item referenced earlier in the thread and the fix for it changes a few methods in the CellInfoCollection class in the Controls/GridView/GridView/Selection folder. I am attaching a picture of the changeset for your reference.

That said, note that we strongly recommend upgrading to the latest version of our dlls, since they contain the most bug fixes/features. 

Regards,
Vladimir Stoyanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
GridView
Asked by
Mohan
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Mohan
Top achievements
Rank 1
John
Top achievements
Rank 1
Vladimir Stoyanov
Telerik team
Share this question
or