Hi All
Windows.Forms.ListBox has terible behavior and I wont be more patient with it.
I need a control which take a collection and display it, allowing its editation (add/remove). If using ListBox, after setting DataSource first item is allways selected, if I change the collection (DataSource), I must set DataSource to null and back to the collection to refresh the list, and more...
How can I replace it? Are there any alternative controls with similar purpose?
Thanks.

1 answers
You could always inherit Windows.Forms.Listbox in a class that you write to provide the functionality you desire.
The setting of the DataSource to null and back to the collection and then refreshing the list could simply be part of a method in your new Listbox class.
All the functionality of the inherited Listbox is still there, and the functionality you don't like can be overriden and you can guide it along with your own code.
answered 8 months ago by:
0
I have just developed a tricky solution. It is more complicated because I need to items to be sorted too.
If my solution will approve to be stable, I will publish it somewhere.
answered 8 months ago by:
0
This post was imported from csharpfriends, if you have a similiar question please ask it again.
All previous members have been migrated, hope you enjoy the new platform!