private void treeView1_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e) { TreeNode newselect = e.Node; listView1.Items.Clear(); // string[] arr = new string[2]; if (e.Node.Text.ToString() == "Art, Design & Fashion") { listView1.Items.Clear(); listView1.BeginUpdate(); display(); listView1.EndUpdate(); } } void display() { if (treeView1.SelectedNode.Text.ToString() == "Art, Design & Fashion") { ListViewItem item; string[] arr = new string[2]; arr[0] = "Rugs & Carpets"; arr[1] = "625"; item = new ListViewItem(arr); listView1.Items.Add(item); arr[0] = "The Suit"; arr[1] = "855"; item = new ListViewItem(arr); listView1.Items.Add(item); arr[0] = "Style Mentors"; arr[1] = "2696"; item = new ListViewItem(arr); listView1.Items.Add(item); arr[0] = "Digital Photography"; arr[1] = "2295"; item = new ListViewItem(arr); listView1.Items.Add(item); } else if (treeView1.SelectedNode.Text.ToString() == "Entertainment") { listView1.Items.Clear(); ListViewItem item; string[] arr = new string[2]; arr[0] = "Rugs & Carpets"; arr[1] = "625"; item = new ListViewItem(arr); listView1.Items.Add(item); arr[0] = "The Suit"; arr[1] = "855"; item = new ListViewItem(arr); listView1.Items.Add(item); arr[0] = "Style Mentors"; arr[1] = "2696"; item = new ListViewItem(arr); listView1.Items.Add(item); arr[0] = "Digital Photography"; arr[1] = "2295"; item = new ListViewItem(arr); listView1.Items.Add(item); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)