List view C# click on file to open it
I have programmed a file explorer using treeView and listView in Visual Studio 2015 . The files that come up in the listView, as an example a pdf file, I want to double click on it to view its contents like windows explorer. How do I retrieve the full path of the file and then show it? Code please. Thank you.
Sums Mohs EdsPosted Aug 19, 2015, 10:32 AM
TreeNode selectedNode = TreeView1.SelectedNode;
{
ListViewItem item = ListView1.SelectedItems[0];
if (item != null)
{
path = selectedNode.FullPath + TreeView1.PathSeparator + item.Text;
}
}