Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Treeview document to save existing xml file...

Treeview document to save existing xml file...

Scheduled Pinned Locked Moved C#
xmlhelpannouncement
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    raj231362
    wrote on last edited by
    #1

    hi all, i am working in treeview control.i am reading a xml file and expanding , draging node to one place to another place.its working and showing in treeview control. but i want to update my existing file when i am draging node.. help me..!! here is my code:- private void treeView1_DragDrop(object sender, DragEventArgs e) { TreeNode newNode; if (e.Data.GetDataPresent("System.Windows.Forms.TreeNode", false)) { Point pt; TreeNode destinationNode; pt = treeView1.PointToClient(new Point(e.X, e.Y)); destinationNode = treeView1.GetNodeAt(pt); newNode = (TreeNode)e.Data.GetData("System.Windows.Forms.TreeNode"); if (!destinationNode.Equals(newNode)) { //destinationNode.Nodes.Add(newNode.Clone()); destinationNode.Nodes.Add((TreeNode)newNode.Clone()); destinationNode.Expand(); //Remove original node newNode.Remove(); } } }

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups