Hi,
I am developing a desktop application that contains a form and a user control. The user control contains a checked listbox, a heading and a link.
End users select countries from the checked list box and then press the link to move to the next screen.
On the next screen the user control is reloaded with a different set of countries. Again, end users select Countries. This happens 4 times. End users can also move back to a previous screen.
I would like to know what the best way is to save the selected countries for each screen. I was considering saving the information in a database, but this would be inefficient as the user may press the back button to move to a previous screen and chnage their selected list.
Any suggestions would be appreciated.
Thanks,
Kabir
Loading
munish prathapPosted Jul 21, 2007, 3:36 AM
And one more i got one record in the table which has some list of items in the checked list box,when i got the focus of the list box items which i fetch from the table make checked in box how can i do
Scott LyslePosted Apr 28, 2007, 2:02 AM
Next, you could merely hide the forms rather than disposing of them in which case they will continue to hold the checked items collection and you will not need to do anything special to redisplay the values.
You could write the value to a database as you'd mentioned but, it you are considering adding a database to handle that alone, then maybe I would reconsider.
Another alternative would be to create a static class with four arraylists; you could create a instance of each arraylist at startup by declaring them new in the program.cs file, and then you could write the content of the checked item list into the arraylist whenever the user selects an item form the list. On form load, you could repopulate the checked item list from the arraylist.