Svae the datasource in a module or a shared property as a class. Then, just
set the datasource of the combobox to this value - set the displaymember and
valuemember properties accordingly.
You're abosultely right though - reloading this each time is a pig - but if
you just load a dataset at init and then use a shared property, you're good
to go.
--
W.G. Ryan MVP (Windows Embedded)
TiBA Solutions
www.tibasolutions.com |
www.devbuzz.com |
www.knowdotnet.com
"vb" <vb@discussions.microsoft.com> wrote in message
news:CA**********************************@microsof t.com...
Hi,
I am new to .Net.
I am using a Combo Box in my windows forms. I am adding the items by
creating the instances and adding the same to the list.
My questions/doubts are:
1. If I have 25 to 30 options in each combo box and like that if we have 6
or 7 combo boxes in a form, isnt it a problem in creating that number of
instances everytime the form is opened/activated
2. How do I dispose the Combo Box items.
Your comments/response is greatly appreciated.
thanks
vb