Problem with ListBox

  • Thread starter Thread starter Daniel Mantilla
  • Start date Start date
D

Daniel Mantilla

I have a ListBox embedded in one of the tabs of a TabControl. I have this
control bound to one of my objects. Everything works fine, until I switch to
another tab, when I switch back to the ListBox all my selections are lost. I
am using SelectionMode = Multiselect. What can I do to prevent this??

Thanks in advance,

Daniel
 
* "Daniel Mantilla said:
I have a ListBox embedded in one of the tabs of a TabControl. I have this
control bound to one of my objects. Everything works fine, until I switch to
another tab, when I switch back to the ListBox all my selections are lost. I
am using SelectionMode = Multiselect. What can I do to prevent this??

You can try to place the control outside a tabpage and move it over the
tabpage at runtime. Then you can hide the control whenever the tabpage
his hidden and show it when the user switches to the tabpage (untested).
 
Off the top of my head, how about saving the selected property(s) to a hash or an array. When that tab is loaded, load the listbox with the selected values.

--
Brian P. Hammer
I have a ListBox embedded in one of the tabs of a TabControl. I have this
control bound to one of my objects. Everything works fine, until I switch to
another tab, when I switch back to the ListBox all my selections are lost. I
am using SelectionMode = Multiselect. What can I do to prevent this??

Thanks in advance,

Daniel
 
Back
Top