I'm using a TreeListView to display some data in a Windows Forms application. When I built the app, I had no problems. I was recently asked to add a button to the UI that caused me to reduce the size of the TreeListView a little so the button would fit at the bottom of the window.
My problem is that if I adjust any of the TreeListView control's properties in any way (change the size, add/remove an anchor, etc.), I am no longer able to save the file or rebuild the project. Instead of normal build errors, I get a Visual Studio error saying:
'ContainerColumnHeaderConverter' is unable to convert 'WinControls.ListView.ContainerColumnHeader' to 'System.ComponentModel.Design.Serialization.InstanceDescriptor'.
If I completely remove the TreeListView's columns, I can save/build again but the second I create new columns, the error returns.
Since I'm using the Properties box in Visual Studio to make changes rather than doing it in the code, I have no idea how this could be happening.
What am I doing wrong?
Thanks!
I ended up just removing the columns and adding them back in the code. This gets around my original problem but doesn't really solve it.
Here's the code: