Link to home
Start Free TrialLog in
Avatar of RBECKMN
RBECKMNFlag for United States of America

asked on

items in checked list box - visual studio

i have an application with several forms that use the same list of items in a checked list box.  over time, the list of items will evolve, so rather than continually update the ITEMS collection in each form separately, I'd like to use an easier method.  the list of items is also stored in a SQL database, and can be configured by application users.

a resource file is one option, as is retrieving the list from the database, but that means rebuilding the ITEMS collection every time one of the forms is loaded which happens often.  another option is to load the forms once, keep them loaded, and show and hide them rather than reload them.

Any other ideas welcome.
Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

Another option is to load a DataTable (declared in a module) once and then use it as the data source of the list during the life time of the app.
Avatar of RBECKMN

ASKER

thanks for the suggestion - that would work, but i'm trying to avoid having to rebuild the list dynamically every time the form is loaded.  i wouldn't mind loading the list once and updating the forms once at the start of each run, but i don't know how to make that a permanent (or semi-permanent) part of the forms.
Keeping forms in memory would take much more resources than building the list. How many items are in the list?
Avatar of RBECKMN

ASKER

25 right now.  it won't grow to more than 60, and is likely to stay under 50.
ASKER CERTIFIED SOLUTION
Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial