Quantcast
Viewing all articles
Browse latest Browse all 12583

Saving a ListView and it's contents in Application Settings

In the application settings screen, it is possible to define a settings of type System.Windows.Forms.ListView.

If I have a ListView control on my form, and populate it with columns and items, should I be able to save all the columns and items to app settings?

If I do this:

Properties.Settings.Default.MyListViewItem = listView1;

Properties.Settings.Default.Save();

When I close my app, reload it, the MyListViewItem is null.  Why?


If I do the exact same thing with a simple datatype, i.e. a string, it works fine.


Thanks

Jon






Viewing all articles
Browse latest Browse all 12583

Trending Articles