Winform treeview questions

4 posts, 0 answers
  1. Johnny
    Johnny avatar
    86 posts
    Member since:
    Dec 2010

    Posted 14 Oct 2011 Link to this post

    Hi all, i have questions about treeview in winform. Is it possible to integrate or combine explorer-like treeview to telerik treeview? I mean when the root folder/node is set to desktop directory, then it would auto generate all the childs and other nodes (which is folders/shortcut) inside the desktop.. Another question is how to make drag n drop function that copy the folder/node and not move it to the other treeview?

    Sorry if I ask many questions here, I am a lil' bit beginner to this thing and hope you all can guide me. Thanx for your coorperation.

    Regards,

    Muz
     
  2. Julian Benkov
    Admin
    Julian Benkov avatar
    1135 posts

    Posted 18 Oct 2011 Link to this post

    Hi Johnny,

    1) To show and process your 'Desktop' data, you can use different binding methods implemented in RadTreeView control. Please review our online documentation (binding section) for details and choose one that is suitable for your application.

    2) To learn how to setup and use Drag & Drop operation between RadTreeView controls, you can take a look at our Demo application, RadTreeView >> Drag & Drop section. In addition, you can read the Enable Drag and Drop article in our online documentation.

    I hope this helps. Do not hesitate to contact us if you have further questions or issues.

    Kind regards,
    Julian Benkov
    the Telerik team

    Q2’11 SP1 of RadControls for WinForms is available for download (see what's new); also available is the Q3'11 Roadmap for Telerik Windows Forms controls.

  3. UI for WinForms is Visual Studio 2017 Ready
  4. Johnny
    Johnny avatar
    86 posts
    Member since:
    Dec 2010

    Posted 02 Nov 2011 Link to this post

    Thanks for your reply. I've done my treeview with explorer function (desktop as root node and my computer, my documents, and all files/folders/shortcuts in desktop as childs). The missing nodes are my network places, recycle bin etc. Could you or anyone guide me how to implement my network places, recycle bin nodes into my treeview explorer. Sample codes is much appreciated.

    Another things I stuck is how to disable copy/clone node to it own radtreeview. FYI my project consist of 2 radtreeviews and node can be drag and drop between them to copy the file and folder. But the project would be much better if I can set restriction only other treeview could receive the node. So my question is how I could achieved that and any help is much appreciated.
  5. Julian Benkov
    Admin
    Julian Benkov avatar
    1135 posts

    Posted 07 Nov 2011 Link to this post

    Hello Johnny, 

    1) For shell manipulationions regarding the file system, network and Recycle Bin you can use these articles in Codeproject:
    2) To disable the Drag and Drop operation for your scenariom you can use DragOverNode event of RadTreeView control. Here is a simple example:
    void radTreeView1_DragOverNode(object sender, Telerik.WinControls.UI.RadTreeViewDragCancelEventArgs e)
    {
        if (e.TreeView == e.Node.TreeView)
        {
            e.Cancel = true;
        }
    }

    I hope this helps.

    Best wishes,
    Julian Benkov
    the Telerik team

    Q2’11 SP1 of RadControls for WinForms is available for download (see what's new); also available is the Q3'11 Roadmap for Telerik Windows Forms controls.

Back to Top