473,473 Members | 2,050 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

TreeView inside a ListView

29 New Member
How could I include a treeView inside a ListView?
Feb 7 '12 #1
4 6524
GaryTexmo
1,501 Recognized Expert Top Contributor
I'm not sure if you can do that with any built in .NET controls. You might want to look at using a custom control. I'm not entirely sure of what functionality you're looking for, but if it's the grid presentation with treeview functionality, the following article may be of use to you.

http://blogs.msdn.com/b/markrideout/...08/510700.aspx

I used this on a project in the past and with fairly minimal enhancement it worked quite well for me :)
Feb 7 '12 #2
Gobi nath
16 New Member
use treeview control on toolbox ,it will suit for u
Feb 9 '12 #3
mylixes
29 New Member
Thanks Gary for the reply. the link you shared helps me a lot. but I had encountered another problem using the expandable datagridView.

My datagrid consists of 4 columns, string column (treeView), combobox, linklabel and string column. Below is my code.

Expand|Select|Wrap|Line Numbers
  1. foreach (KeyValuePair<int, string[]> name in nameDictionary)
  2.             {
  3.                 parentNameNode = helper.getName(name.Value[i]);
  4.  
  5.                 //treeView1.Font = new Font(null, FontStyle.Bold);
  6.                 parentNode = rootNode.Nodes.Add(parentNameNode);
  7.                 parentNode.DefaultCellStyle.Font = new Font("Verdana", 7, FontStyle.Bold);
  8.  
  9.                 if (name.Value.Length > 1)
  10.                 {
  11.  
  12.                     for (int a = 0; a < name.Value.Length; a++)
  13.                     {
  14.  
  15.                         childNode = parentNode.Nodes.Add(readerName.Value[a], "aaaa", "Start");
  16.                         childNode.DefaultCellStyle.Font = new Font("Verdana", 7, FontStyle.Regular);
  17.  
  18.  
  19.                     }
  20.                 }
  21.  
Question:

How could I populate the comboBox column? I am getting this error "DataGridViewComboBoxCell value is not valid".

Please help me.
Mar 7 '12 #4
LittleDong
11 New Member

Question:

How could I populate the comboBox column? I am getting this error "DataGridViewComboBoxCell value is not valid".

Please help me.
comboBox.Items.Add(yourItemshere)
is this useful?
Mar 7 '12 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Helge Lenuweit | last post by:
Hello, I have an application that uses TreeView and ListView just like Windows Explorer or Outlook. You click on a tree node and the list is filled up with corresponding elements. My list...
1
by: Daisy | last post by:
I'm writing a NewsReader (seemed like a decent project to start learning with), and want threading like in OE. I've got a treeview and a listview. On Expand/Contract on the listview, I spin...
1
by: Mike | last post by:
Hi, Is there the possibility to have a ListView with a column that display items in a TreeView manner. How can I do that? Thanks. Mike
0
by: g1ga | last post by:
is there a way to drag icons (items) of a listview inside listview itself in a disordered way (like windows explorer)? I wondered why such a control is not implemented since it is one of the core...
6
by: Beginner | last post by:
Hi, I'm trying to populate a TreeView from an existing and filled in ListView (lvwBuild). lvwBuild is a basic two column listview which can have any number of rows. I would like the first...
2
by: stacy | last post by:
I am attempting to port an application from a Windows app to an ASP.NET Web App. I notice that the TreeView and ListView controls are not part of the tool box on the WebForm. Can someone tell me...
6
by: Pucca | last post by:
My container with 2 panels containning Treeveiw and Listview controls are chopped off on the top by the toolstripmenu when I dock the these 2 contols in the parent container and the container is...
0
debasisdas
by: debasisdas | last post by:
This sample code displays employee name in the treeview control from the emp table of Scott schema in oracle database. To start with Select Microsoft windows common controls 6.0 (SP6) from...
3
by: =?Utf-8?B?QWxoYW1icmEgRWlkb3MgS2lxdWVuZXQ=?= | last post by:
Hi misters, "And the link to Microsoft's site on that blog says: "The following ASP.NET controls are not compatible with partial-page updates, and are therefore not supported inside an...
4
by: fonix232 | last post by:
Hi there! I would like to ask for some help. I'm making a little application what is a modding tool, so in the main window it has a treeview and a detailed list view to show files what can be...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.