Is it possible to drag a row from telerik grid to drop on windows form treeview control?
In my code i am able to drag the row from telerik grid but DragEnter event of windows form treeview control is not firing?
Hello, Sithara, In order to implement drag and drop behavior between a RadControl, e.g. RadGridView and a standard MS Control, e.g. TreeView, it is suitable to use the Ole drag-and-drop functionality. Please refer to the following help article demonstrating how to use it: https://docs.microsoft.com/en-us/dotnet/framework/winforms/advanced/walkthrough-performing-a-drag-and-drop-operation-in-windows-forms I have prepared a very basic example to test whether the DragEnter event of the target TreeView will be fired and it seems to work as expected on my end:
this.treeView1.AllowDrop = true;
this.treeView1.DragEnter += treeView1_DragEnter;
this.radGridView1.MouseDown += radGridView1_MouseDown;
this.radGridView1.MouseMove += radGridView1_MouseMove;
private void radGridView1_MouseMove(object sender, MouseEventArgs e)
if (e.Button == System.Windows.Forms.MouseButtons.Left && downLocation != Point.Empty)
GridDataCellElement elementUnderMouse = this.radGridView1.ElementTree.GetElementAtPoint(e.Location) as GridDataCellElement;
Point downLocation = Point.Empty;
private void radGridView1_MouseDown(object sender, MouseEventArgs e)
downLocation = e.Location;
private void treeView1_DragEnter(object sender, DragEventArgs e)
e.Effect = DragDropEffects.Move;
I hope this information helps. If you need any further assistance please don't hesitate to contact me.
Dess | Tech Support Engineer, Sr.