Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Controls
  New Posts New Posts RSS Feed - Drag & drop between 2 treeviews
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Drag & drop between 2 treeviews

 Post Reply Post Reply
Author
Message
iamgtd View Drop Down
Senior Member
Senior Member
Avatar

Joined: 25 February 2009
Status: Offline
Points: 131
Post Options Post Options   Thanks (0) Thanks(0)   Quote iamgtd Quote  Post ReplyReply Direct Link To This Post Topic: Drag & drop between 2 treeviews
    Posted: 28 October 2009 at 6:14am
I need help for the drag & drop operation between two CodeJock treeviews.
 
In the OLEDragDrop-event  the target treeview receives something. But I'm not able to convert this to a TreeViewNode. Please see the code. Is it necessary to do something in the OLEDragOver-Event? A sample would be great.
 
private void SourceTreeView_OLEStartDrag(object sender, AxXtremeSuiteControls._DTreeViewEvents_OLEStartDragEvent e)
{
    e.allowedEffects = 1; // Copy
   
    // ------------------------------------------------------------------------------------------------------------------------------------------
    // Is it necessary to use the SetData-method?
    // ------------------------------------------------------------------------------------------------------------------------------------------
    //XtremeSuiteControls.TreeViewNode node = SourceTreeView1.SelectedItem;
    //e.data.Clear();
    //e.data.SetData(node,???Format???);
}
 
private void TargetTreeView_OLEDragDrop(object sender, AxXtremeSuiteControls._DTreeViewEvents_OLEDragDropEvent e)
{
    XtremeSuiteControls.TreeViewNode newnode = (XtremeSuiteControls.TreeViewNode)e.data;
    // ------------------------------------------------------------------------------------------------------------------------------------------
    // newnode is always null
    // type of e.data is XtremeSuiteControls.DataObject {System.__ComObject} and the value is {System.__ComObject}
    // How can I convert this to a TreeViewNode?
    // What's to do with the e.effect-value? This value is alwasy 7.
    // ------------------------------------------------------------------------------------------------------------------------------------------
}
---------

OS: Win 10 64 bit

Codejock Version 22.1 ActiveX

MS Visual Studio 2022 - C#

---------
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.105 seconds.