Need More Info
Last Updated: 02 Dec 2020 14:48 by ADMIN
avani
Created on: 28 May 2019 07:16
Category: UI for WinForms
Type: Bug Report
0
RadTreeVirew On Drag and Drop Gives Error "'Collection was modified; enumeration operation may not execute.'" then stop the Application.

Hi All,

Note:- I am using Bound RadTreeview. Bound with DataSource.

1 Take RadTreeview

2 Add Few nodes Like:

    ......Node A

    ......Node B

    ......Node C

    ............Node D

    ............Node E

3 Now Drag Node B and Drop it in Node C (As Node C's Child)

4 It throw Exception Error Msg  "Collection was modified; enumeration operation may not execute."

5  Now Try to Drag Node E and Drop it in Node B, again same error occurs

6 Full error screen i attached here.

Please reply as soon as possible.

 

1 comment
ADMIN
Dess | Tech Support Engineer, Principal
Posted on: 28 May 2019 13:19
Hello, Avani,    

When RadTreeView is in bound mode, it supports a basic drag and drop behavior. The dragged node is inserted at the last position in its parent. In order to enable this functionality, you should set the AllowDragDrop property to true. However, due to the specificity of the RadTreeView’s data binding and the set up hierarchical data structure, it is necessary to handle manually the drag and drop operation to obtain correct nodes order. A sample approach is demonstrated in the following help article: https://docs.telerik.com/devtools/winforms/controls/treeview/drag-and-drop/drag-and-drop-in-bound-mode

As to the exception, I was unable to observe the error on my end following the provided steps. Please refer to the attached gif file illustrating the behavior on my end with the specified version. I have attached my sample project. Feel free to modify it 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. 

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.