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#
---------
|