title: How to add the treeview selected items in a listview columns?
body: <p><a href="https://i.stack.imgur.com/L8d6K.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/L8d6K.jpg" alt="enter image description here"></a>I want to add those selected items in a treeview to listview. Please Help me to get out of this...</p>
  
  <pre><code>private void treeView1_AfterSelect(object sender, TreeViewEventArgs e)
      {
          PopulateListView(e.Node.Checked.ToString());
      }
  
      void PopulateListView(string path)
      {
          listView1.Clear();
  
          DirectoryInfo di = new DirectoryInfo(path);
  
          if (di.Exists)
          {
              foreach (DirectoryInfo d in di.GetDirectories())
              {
                  listView1.Items.Add(new ListViewItem(d.Name));
              }
  
              foreach (FileInfo f in di.GetFiles())
              {
                  listView1.Items.Add(new ListViewItem(f.Name));
              }
          }
      }
  </code></pre>