I need a multi columned Treeview for an app I am writing, I was wondering if anyone knew of a free working (in Vs-2010) multi columned Treeview.
Asked
Active
Viewed 9.7k times
34
-
3WinForms, WPF, ASP.NET,...? And what exactly would a TreeView with multiple columns look like? Can you post a mockup image? I can't imagine how that would even be usable. – Cody Gray - on strike Feb 06 '11 at 11:17
-
@Cody In Delphi land everyone uses Virtual Tree View for this and yes they do use it with multiple columns! – David Heffernan Feb 06 '11 at 11:26
-
Ah, of course. If you'd described it as an expandable ListView, I would have known exactly what you were talking about. No good reason why it should be classified as one or the other. And in the absence of further clarification, my answer assumes WinForms just because. – Cody Gray - on strike Feb 06 '11 at 11:33
4 Answers
61
There are a number of sample controls to be found around the web:
But the all-time favorite is probably the ObjectListView, which provides an expandable, multi-column ListView, along with many other incredibly handy features:

Cody Gray - on strike
- 239,200
- 50
- 490
- 574
-
Hi Cody, i just downloaded t he ObjectListView just before i saw this answer, but for some reason i can not get it to work. Btw this is using VS2010 - to test it i create a new project, add a reference to the objectlistview.dll add the controls to the toolbox, then copy drap the treelist view accross - do nothing else but try to run it and: – Vade Feb 06 '11 at 12:14
-
1Warning 2 The referenced assembly "ObjectListView" could not be resolved because it has a dependency on "System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which is not in the currently targeted framework ".NETFramework,Version=v4.0,Profile=Client". Please remove references to assemblies not in the targeted framework or consider retargeting your project. WindowsFormsApplication9 + The type of namespace BrightIdeasSoftware could not be found – Vade Feb 06 '11 at 12:15
-
3@Vade: Yeah, it depends on the `System.Design` namespace, which isn't part of the Client Profile Framework. VS 2010 creates new projects targeting the Client Profile by default, though, so you'll have to change it manually. Go into your project properties and switch to the full .NET 4.0 Framework. Then add a reference to `System.Design` and recompile. – Cody Gray - on strike Feb 06 '11 at 12:19
-
1@Vade: Scroll down to the second header (Changing an Existing Project) on [this page](http://msdn.microsoft.com/en-us/library/bb398202.aspx) for step-by-step instructions on how to change the target framework. – Cody Gray - on strike Feb 06 '11 at 12:20
-
@Cody: Thank you, i have managed to get all that working now :) just a couple of quick fire questions: 1. having to change the target, does that effect anything on the client machines? on which its to run. 2. i have added a control, which i have added columns and some dummy data items and groups but when i run it it just shows a blank box with the column headers. any ideas? Once again thank you – Vade Feb 06 '11 at 12:37
-
1@Vade: 1) Yes, you'll need the full version of the .NET Framework rather than the Client Profile. It's about 15% larger, pretty much insignificant. You don't have much choice though. `System.Design` isn't in the Client Profile. 2) You need to read the documentation for ObjectListView. The trade-off for its power is that it's not *exactly* a drop-in replacement for the standard ListView/TreeView controls. Things behave a little bit differently, but the docs are very very good. See the [Getting Started](http://objectlistview.sourceforge.net/cs/gettingStarted.html) section. – Cody Gray - on strike Feb 06 '11 at 12:54
-
@Cody, After playing around with this component, which i must say is great. I think i might have to stick with a basic treeview and not worry about columns, the reason behind this is as this app is to run on NHS computers at a couple of surgeries near where i live (Cornwall) i can not guarantee that they will have the full .NET installed. however i will definitly play with it some more for future applications. thank you for you all your help. – Vade Feb 06 '11 at 14:42
-
@Vade: You really should deploy your application with an installer (you can use Visual Studio to create a Setup Project without any trouble at all), and then it doesn't matter if you're using the Client Profile or the full version. You can't rely on *any* computers "in the wild" to have .NET 4.0 installed. It hasn't even been bundled with a version of Windows, and we all know that people don't keep their computers updated like they should. But if necessary, using separate TreeView and ListView controls will probably do what you need. Just sync them so the ListView updates when clicking a node. – Cody Gray - on strike Feb 06 '11 at 14:44
-
@CodyGray +1 I have to agree with your favorite. I've been checking several options today, and ObjectListView turned out to be the most recent maintained (Feb' 14), and most feature rich what you can get from a freely available .NET WinForms control. It also compiled well for me using my current SharpDevelop environment. – πάντα ῥεῖ Aug 26 '14 at 18:05
-
7The biggest problem I see with ObjectListView is that it is licensed under GPLv3. Why oh why is it not at least using LGPL? Makes it useless except for use in GPL licensed programs. – kjbartel Apr 21 '15 at 01:55
-
it's 2018, but **ObjectListView** still not work in mono properly – Alex Skiffin Oct 18 '18 at 18:15
-
1Forewarning against ObjectListView in 2018 - the library has significant performance issues when used in .NET 4+ projects. – Christopher Nov 07 '18 at 13:23
-
Thanks for the warning, @Christopher. I haven't used .NET in years, but I'm curious why that would be the case. There shouldn't be any breaking changes in .NET 4 that would cause significant performance issues. Have you reported this to the developer? Are you basing this on personal experience, or word of mouth? – Cody Gray - on strike Feb 02 '19 at 06:13
2
-
6"Here"-Links are not very readable, I'd prefere some sensible link text, that tell me where the link leads without having to actually follow the link. – trapicki Mar 31 '14 at 12:32
-
I want cell edit functionality here with this control how can we do that. – Anil Jun 08 '18 at 06:13
-
@Anil: it's a really old question and wouldn't know how to help. Sorry for that. Cheers. – LeftyX Jun 21 '18 at 12:42
1
Try this Microsof TreeListView WPF control
http://msdn.microsoft.com/en-us/library/vstudio/ms771523%28v=vs.90%29.aspx
-2
You can do an illusion to the user in the user interface.
- Drag a listview and drop this over the treeview which was already placed in the form.
- Create columns in the listview as you need.
- Set the 'HeaderStyle' property to 'Nonclickable' and 'Scrollabe' property to 'False' of the listview.
- Set width and location of the listview as it fits to the treeview.

Ben
- 51,770
- 36
- 127
- 149

Rashedul.Rubel
- 3,446
- 25
- 36