The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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?
> 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 12:26 PM UTC
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.