Print Page | Close Window

Reordering Tree records via mouse dragging

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=19002
Printed Date: 23 November 2024 at 8:58pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Reordering Tree records via mouse dragging
Posted By: Orf
Subject: Reordering Tree records via mouse dragging
Date Posted: 29 September 2011 at 5:50pm
I have a tree setup in C# that displays the files system, similar to the Details view in Windows Explorer.

I want to be able to select a file that already exists in the tree, and drag it on top of a folder.  When hovering over a closed folder, I'd like that folder to automatically open.  When hovering over other files, I'd like the red >---< insert indicator to appear, just like it does for the OLE Drag/Drop.  When I release the mouse, I'd like the file to be moved from its old position in the tree to the position marked by the indicator.

How do I do this?  I've been experimenting with the DragDrop functionality but it appears to only be potentially possible when dragging a node from tree1 into treeN where N is not 1.

I'm doing the following:

            m_TreeControl.EnableDragDrop("TC:InternalDrag", XTPReportDragDrop.xtpReportAllowDrag | XTPReportDragDrop.xtpReportAllowDrop);
            m_TreeControl.BeginDrag += new AxXtremeReportControl._DReportControlEvents_BeginDragEventHandler(m_TreeControl_BeginDrag);
            m_TreeControl.DropRecords += new AxXtremeReportControl._DReportControlEvents_DropRecordsEventHandler(m_TreeControl_DropRecords);
            m_TreeControl.RecordsDropped += new AxXtremeReportControl._DReportControlEvents_RecordsDroppedEventHandler(m_TreeControl_RecordsDropped);
            m_TreeControl.AllowDrop = true;


Callbacks:

        void m_TreeControl_RecordsDropped(object sender, AxXtremeReportControl._DReportControlEvents_RecordsDroppedEvent e)
        {
            Debug.WriteLine("Records dropped");
        }

        void m_TreeControl_DropRecords(object sender, AxXtremeReportControl._DReportControlEvents_DropRecordsEvent e)
        {
            Debug.WriteLine("Drop Records");
        }

        void m_TreeControl_BeginDrag(object sender, AxXtremeReportControl._DReportControlEvents_BeginDragEvent e)
        {
            Debug.WriteLine("Begin drag");
        }


When I start dragging a node, my "Begin drag" message is printed correctly to the output window, but the mouse cursor shows that the source tree isn't a valid drop target.  Is there anyway to do what I want?



Replies:
Posted By: ABuenger
Date Posted: 30 September 2011 at 10:41am
Hi,

please open a support ticket:

http://forum.codejock.com/forum_posts.asp?TID=14125&FID=124&PR=3&title=notice-codejock-support-policy - http://forum.codejock.com/forum_posts.asp?TID=14125&FID=124&PR=3&title=notice-codejock-support-policy

Andre





-------------
Codejock support


Posted By: Orf
Date Posted: 30 September 2011 at 2:06pm
That was my next course of action.

Thanks Andre, will do!



Posted By: mgampi
Date Posted: 30 September 2011 at 4:23pm
Hi;

I asked nearly the same question in may 2011 (see my post at  http://forum.codejock.com/forum_posts.asp?TID=18336 - http://forum.codejock.com/forum_posts.asp?TID=18336 ) and I also opened a support ticket (#26604), but I never got a solution.
I'm still waiting for an implementation by CJ team (last activity from CJ concerning this issue: May, 15 2011)!


-------------
Martin

Product: Xtreme Toolkit v 22.1.0, new Projects v 24.0.0
Platform: Windows 10 v 22H2 (64bit)
Language: VC++ 2022



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net