Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7185087
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T18:20:16+00:00 2026-05-28T18:20:16+00:00

So I followed MS article http://msdn.microsoft.com/en-us/library/ms171645.aspx This is Creating an Explorer Style Interface with

  • 0

So I followed MS article http://msdn.microsoft.com/en-us/library/ms171645.aspx

This is Creating an Explorer Style Interface with the ListView and TreeView Controls Using the Designer.

Right now it loads up a tree view on the left with folders, and then on the rigth it shows the list view.

Now when i select a folder or file on the right hand pane, I would like to get the full file path. Howerver, when I do the listview.selectIndex[0], it only provides me the name. I belive this is becuase the path is being dirrived from the left hand tree view.

Does this make sense? What i want to accomplish is to select the file and it provide me the full path.

Suggestions?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T18:20:17+00:00Added an answer on May 28, 2026 at 6:20 pm

    when I do the listview.selectIndex[0], it only provides me the name. I belive this is becuase the path is being dirrived from the left hand tree view.

    Correct. You need to combine the path from the TreeView control with the name of the item in the ListView control.

    Sample code (where TreeView1 is your left-hand TreeView control, and ListView1 is your right-hand ListView control):

    String GetSelectedItemPath()
    {
        String path = String.Empty;
    
        // See if a node is selected in the TreeView
        TreeNode selectedNode = TreeView1.SelectedNode;
        if (selectedNode != null)
        {
            // Also check that an item is selected in the ListView
            ListViewItem item = ListView1.SelectedItems[0];
            if (item != null)
            {
                // Build the full path to the selected item.
                path = selectedNode.FullPath + TreeView1.PathSeparator + item.Text;
            }
        }
    
        return path;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I followed MS article http://msdn.microsoft.com/en-us/library/ms171645.aspx This is Creating an Explorer Style Interface with
I've followed the instructions in this MSDN article: http://msdn.microsoft.com/en-us/library/dd206945.aspx Is it possible to call
I followed this article http://www.codeproject.com/KB/sharepoint/ASPNET_to_Sharepoint.aspx and it worked converting my ASP.net Site into SharePoint
I have followed this tutorial http://blogs.wrox.com/article/creating-a-simple-ipad-application-table-view/ (creating a uitableview and populating it). I want
I followed the guide on the very bottom of this article: http://symfony.com/doc/current/cookbook/assetic/asset_management.html I have
http://www.devx.com/wireless/Article/39101/0/page/2 I have followed this tutorial and got it to work and everything. now
Some 4 years back, I followed this MSDN article for DateTime usage best practices
I have seen the following links before posting this question http://www.devx.com/wireless/Article/40792/1954 Saving Android Activity
I'm aggregating RSS feeds using FeedTools. I followed this tutorial: http://simonwoodside.com/weblog/2008/12/7/ruby_on_rails_feedrss_aggregator/ and everything functioned
If I need to go from this service contract: [ServiceContract(Namespace=http://api.x.com/Svc1)] public interface IService1 {

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.