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

Errors after controls updated

3 Answers 123 Views
VirtualGrid
This is a migrated thread and some comments may be shown as answers.
Czeshirecat
Top achievements
Rank 2
Iron
Iron
Czeshirecat asked on 18 Mar 2019, 11:07 AM

Hi

I've recently released a version of our software that had version 2019.1.117.40 of Telerik.

Soon afterwards I needed to reformat and rebuild my working environment, reinstall visual studio and telerik and received a telerik version error after loading up my solution. So I ran an upgrade which installed 2019.1.219.40.

After this I started experiencing errors in the Virtual Grid. Last week I added a thread to the forum about access violations when calling bestfit on a column, it was suggested that my code should wait until the form is loaded/shown before doing this.In version 2019.1.117.40 I hadn't experienced this problem despite all the hours I'd spent developing and testing.

The form in question contains a panel which is parented onto a host form, so it never receives a formshown event, I use the hostform shown event to call the code on the child. But, the child panel contains a pageview with 4 pages, each of which contains a virtual grid. Even though the form is visible, I'm experiencing that same access violation on the first page of data.

Now, I'm seeing another problem which I didn't experience in 2019.1.117.40, when I attempt to change the sort order.

"Collection was modified; enumeration operation may not execute"

   at System.Collections.ArrayList.ArrayListEnumeratorSimple.MoveNext()
   at Telerik.WinControls.UI.VirtualGridRowElement.<GetCellElements>d__0.MoveNext()
   at Telerik.WinControls.UI.VirtualGridRowElement.SynchronizeCells(Boolean updateContent)
   at Telerik.WinControls.UI.VirtualGridRowElement.Synchronize(Boolean updateContent)
   at Telerik.WinControls.UI.VirtualGridTableElement.SynchronizeRows(Boolean recursive, Boolean updateContent)
   at Telerik.WinControls.UI.VirtualGridTableElement.OnViewInfoPropertyChanged(Object sender, PropertyChangedEventArgs e)
   at Telerik.WinControls.RadObject.OnNotifyPropertyChanged(PropertyChangedEventArgs e)
   at Telerik.WinControls.UI.VirtualGridViewInfo.OnNotifyPropertyChanged(PropertyChangedEventArgs e)
   at Telerik.WinControls.RadObject.OnNotifyPropertyChanged(String propertyName)
   at Telerik.WinControls.UI.VirtualGridViewInfo.set_IsWaiting(Boolean value)
   at pulse.move.views.Helpers.MemberSelection.VirtualGridHandlerClassBase.WaitCursor(Boolean showWaiting) in W:\Projects\pulse.smartcentre.root\pulse.smartcentre\pulse.move.views\Helpers\MemberSelection\VirtualGridHandlerClass.Base.cs:line 1059
   at pulse.move.views.Helpers.MemberSelection.VirtualGridHandlerClassBase.AskForData(Int32 pageIndex) in W:\Projects\pulse.smartcentre.root\pulse.smartcentre\pulse.move.views\Helpers\MemberSelection\VirtualGridHandlerClass.Base.cs:line 1009
   at pulse.move.views.UserCentre.Tabs.GridHandlers.UserCentreVirtualGridHandler.AskForData(Int32 pageIndex) in W:\Projects\pulse.smartcentre.root\pulse.smartcentre\pulse.move.views\UserCentre\Tabs\GridHandlers\UserCentreVirtualGridHandler.cs:line 94
   at pulse.move.views.Helpers.MemberSelection.VirtualGridHandlerClassBase.OnMasterViewSortChanged() in W:\Projects\pulse.smartcentre.root\pulse.smartcentre\pulse.move.views\Helpers\MemberSelection\VirtualGridHandlerClass.Base.cs:line 847
   at pulse.move.views.Helpers.MemberSelection.VirtualGridHandlerClassBase.OnSortChanged(Object sender, VirtualGridEventArgs e) in W:\Projects\pulse.smartcentre.root\pulse.smartcentre\pulse.move.views\Helpers\MemberSelection\VirtualGridHandlerClass.Base.cs:line 865
   at Telerik.WinControls.UI.RadVirtualGridElement.OnSortDescriptorsChanged(VirtualGridViewInfo viewInfo)
   at Telerik.WinControls.UI.VirtualGridViewInfo.sortDescriptors_CollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
   at Telerik.Collections.Generic.NotifyCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
   at Telerik.Collections.Generic.NotifyCollection`1.EndUpdate(Boolean notify)
   at Telerik.WinControls.UI.VirtualGridInputBehavior.HandleMouseUp(MouseEventArgs args)
   at Telerik.WinControls.UI.RadVirtualGrid.OnMouseUp(MouseEventArgs e)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at Telerik.WinControls.RadControl.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

 

Although there are backup directories, how do I rollback to this earlier version of controls now I've had to reformat?

 

3 Answers, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 19 Mar 2019, 11:21 AM
Hello, Claire,

The described behavior doesn't seem to be correct. That is why I tried to replicate the issue locally following the provided information. However, everything seems to work as expected on my end. I have attached my sample project. Could you please specify the exact steps how to reproduce the problem?

Feel free to modify it the project in a way to reproduce the experienced issue and get back to me with it so I can investigate the precise case. Thank you in advance. 

As to the version changing, note that you can uninstall the Telerik UI for WinForms suite from Control Panel and install the desired version: https://docs.telerik.com/devtools/winforms/installation-and-upgrades/installing-on-your-computer

I am looking forward to your reply.
 
Regards,
Dess | Tech Support Engineer, Sr.
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.
0
Czeshirecat
Top achievements
Rank 2
Iron
Iron
answered on 19 Mar 2019, 12:59 PM

I 'think' I've found my bug, but I don't understand why it showed up after installing the new control set.

When reading and manipulating the tables on a sort, I need to set grid.rowcount and grid.columncount to zero temporarily even though the recordcount didn't change when the grid sort changes. (I usually run a query to obtain the record count before calling another query to read in my page of data, but for a sort order I don't need a record count) I think this stops sychronization of data in the grid where an old table of data is switched to the new one, hence throwing the error.

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 20 Mar 2019, 09:39 AM
Hello, Claire,

Since I am not familair with the specific implementation that you have on your end, I would highly recommend you to have a look at the following help article which demonstrates in details how exactly to achieve sorting in RadVirtualGrid: https://docs.telerik.com/devtools/winforms/controls/virtualgrid/sorting/sorting

Our Demo application >> VirtualGrid >> First Look example is quite useful on this topic as well.

If you are still experiencing any further difficulties, I would kindly ask you to modify my sample project from the previous reply in a way to demonstrate the problem you are facing. Thus, we would be able to make an adequate analysis of the precise case and assist you further. Thank you in advance for your cooperation.

I am looking forward to your reply.

Regards,
Dess | Tech Support Engineer, Sr.
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
VirtualGrid
Asked by
Czeshirecat
Top achievements
Rank 2
Iron
Iron
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Czeshirecat
Top achievements
Rank 2
Iron
Iron
Share this question
or