> I have a CheckedListbox on a tabControl. When I select items in the listbox and I go to another tab, selected items are lost when I come back to the first tab.
> Any workaround to this?
ADAdministrator Syncfusion Team March 18, 2003 07:26 AM
Yup, I've run into this as well. In Usenet posts, MS has acknowledged this bug. The problem is essentially that any time the visibility changes on a CheckedListBox, it loses its previous selections. Naturally this happens all the time in tab controls when changing tabs.
I think your best bet would be to listen to the events when the checked state of an item changes in the CheckedListBox and maintain a collection of checked items (separately from the CheckedListBox). If the CheckedListBox is hidden, it will lose its selections, but when it is shown again, you can restore the selection from your own collection. Something along those lines should work, I believe that's how we solved it in the past.