How I Learned to Stop Worrying and Love .NET's ListView

ObjectListView is a C# wrapper around a .NET ListView. It makes the ListView much easier to use and provides some neat extra functionality.

Larry Wall, the author of Perl, once wrote that the three essential character flaws of any good programmer were sloth, impatience and hubris. Good programmers want to do the minimum amount of work (sloth). They want their programs to run quickly (impatience). They take inordinate pride in what they have written (hubris).

ObjectListView encourages the vices of sloth and hubris, by allowing programmers to do far less work but still produce great looking results.

I'm too impatient! Just show me what it can do!

Here is an example of what your ListView can look like with a few callbacks in place:

The TreeListView similarly make a tree structure look beautiful:

And this is the report that can be effortlessly produced from the ObjectListView:

Without wasting my time, just tell me what it does!

OK, here's the bullet point feature list:

OK, I’m interested. What do I do next?

You can download a demonstration of the ObjectListView in action. This demo includes ObjectListView project which you need to include in your project.

Once you have the demo, you might want to look at the Getting Started and the Cookbook sections. Please make sure you have read and understood these sections before asking questions in the Forums. There is an article describing the ObjectListView at CodeProject.

At some point, you will want to do something with an ObjectListView and it won't be immediately obvious how to make it happen. After dutifully scouring the Getting Started and Cookbook section, you decide that is is still not obvious. The Forum section is the place to find all your as-yet-unasked questions. The discussion on CodeProject is also fairly lively.

It may even be possible that you might find some undocumented features in the code (also known as bugs). These "features" can be reported to the project's Issue Tracker and the status of your "feature" report can be tracked here.

Finally, after you realise just how great the ObjectListView is, and how you really have come to love .NET's ListView, you will be moved with gratitude to give a donation to ensured the continued development of this code.

If you would like to ask me a question or suggest an improvement, you can contact me here: phillip_piper@bigfoot.com.

Bleeding-edge source

If you are a very keen developer, you can access the SVN repository directly for this project. The following SVN command will fetch the most recent version from the repository:

 svn co https://objectlistview.svn.sourceforge.net/svnroot/objectlistview/cs/trunk objectlistview 

There are details on how to use Subversion here on SourceForge.

Please remember that code within the SVN is bleeding edge. It has not been well-tested and is almost certainly full of bugs. If you just want to play with the ObjectListView, it's better to stay with the official releases, where the bugs are (hopefully) less obvious.

What people have said about ObjectListView

When thinking about using some new code, it's always interesting to hear what others have said about it.

Thanks for this control, which I now use everywhere I can! It works great.
William Sauron
Intelligent and Intuitive. Thanks.
Mike Hankey (4th Marines HQ)
One of the guys over at the MSDN magazine is known as the Datagrid (ASP.Net) whisperer. You must be the Listview whisperer. DAMN! This is a sexy bunch of controls!
Jonathan C Dickinson
What can I say? I have a file verification program, and I just replaced the listview with yours, and 150 lines of code was made obsolete, and very few lines were added, it also improved performance massively. The light shine upon you, MS should send you some sort of gift for removing the largest headache .NET ever contrived.
Member 3791472
I've got to say, your code is amazing. It's the only time in my life that I've looked at code and thought it was better than mine. Thanks for your great work (on many levels) and for sharing it.
Brian Perrin (in personal email)
I think you should rename the control description to: "A ListView on Steroids". Keep up the excellent work.
Michael (mpgjunky)
Nice features added, especially the fast build speed and hidden columns, keep up the good work on this control! well done.
A VERY BIG "Thank you" for this wonderful control - it's easy to handle once you got the idea, very good structured coding, just a jewel. It became soon one of my favourites.
Great control. This solves a lot of problems. Thank you very much
Thanks for a GREAT control, and also for your help
I use this control in almost every project now.. amazing job. Thanks!
Chris Micali
I've never posted before but this is so good, that I must say something... This is awesome!! Keep the good work!
Thank you for opening your hard work to the community, it saved me hours or coding plus I learnt a few new techniques from your code.
Those years of experience and innate talent certainly show in this code; it's a pleasure to read. Thanks much for a great example.
Steve Shaffer
Very nice article and worthy of bookmarking
Paul Conrad
That's exactly what I have been finding for days. Thanks!!!