The ListView control in System.Windows.Forms 2.0 has a bug

Oh my, the end users are going to get really entertained with this bug.

I’m trying to present images as icons on a list view and the end user should drag and drop the image to the desired location inside the list view to have their list ordered. Unfortunately no matter to which position you drag and drop the image, the image is always placed at the end.
I found a forum post about this with no solution:
Inserting items at specific index in listviews (c# .net 2.0)

If anyone knows of a workaround, I would be more than happy to know. Poor end users will have to get a lot of training to realize the drag and drop only drops the items at the end…

Thanks for the connect program at MSDN.
There is a published workaround here:
MSDN Connect Issue # 115345

And at the end all the fault is on the Win32 List View implementation on which this .net control is based:

MSDN Connect Issue # 94685

Note the published workaround won’t work if you’re not using Groups on your ListView. I modified this to work directly with the ListViewItem Items collection. I might publish an extended version of the control here with this fix if time permits…

Happy coding!

Monday morning random rambling…

Now that caffeine is taking effect: I attended the Heroes Happen Here event in Toronto last week. The event was fun in general, lots of marketing going on so the developers get really biased, towards Microsoft technologies, of course…
Not that this is necessarily a bad thing, as long as you keep your mind open to what’s going on on other development niches and keep the constructive criticism.
I enjoyed the developer tracks in the morning but most of all I enjoyed two architecture presentations, they were light and fun, not too deep in content though, but very refreshing. Here are the blogs of the conference authors:
No Spin Architecture
Joel’s blog on architecture

Both blogs have tons of resources for aspiring architects.

There was a third presenter that raffle 4 architecture books, the raffle consisted on answering a question at light speed, doh! I’m planning on getting the books at amazon…

Overall, I got good software to try, saw that VS2008 has the split markup/code feature for web development that Macromedia had when I started doing web in 2000 and I should get a copy of Vista on my mail in the next few weeks. I’m excited about the JavaScript debugger and IntelliSense in VS2008. Hyper-V promises to be more secure than VMWare, SQL Server 2008 has the FileName type I wish I have now for my image archiving project…
I can’t wait to get my hands on Virtual Earth web service and bundle it with the new maps capabilities in SQL Server 2008, if time permits, there’s only 24 hours in a day and deadlines cannot be stretched :-p

Cheers!