Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - Reordering Tree records via mouse dragging
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Reordering Tree records via mouse dragging

 Post Reply Post Reply
Author
Message
Orf View Drop Down
Newbie
Newbie
Avatar

Joined: 29 September 2011
Location: Kirkland, WA
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote Orf Quote  Post ReplyReply Direct Link To This Post Topic: Reordering Tree records via mouse dragging
    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?
Back to Top
ABuenger View Drop Down
Newbie
Newbie
Avatar

Joined: 02 February 2006
Status: Offline
Points: 1075
Post Options Post Options   Thanks (0) Thanks(0)   Quote ABuenger Quote  Post ReplyReply Direct Link To This Post Posted: 30 September 2011 at 10:41am
Codejock support
Back to Top
Orf View Drop Down
Newbie
Newbie
Avatar

Joined: 29 September 2011
Location: Kirkland, WA
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote Orf Quote  Post ReplyReply Direct Link To This Post Posted: 30 September 2011 at 2:06pm
That was my next course of action.

Thanks Andre, will do!

Back to Top
mgampi View Drop Down
Senior Member
Senior Member
Avatar

Joined: 14 July 2003
Status: Offline
Points: 1201
Post Options Post Options   Thanks (0) Thanks(0)   Quote mgampi Quote  Post ReplyReply Direct Link To This Post 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) 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
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.215 seconds.