How can I save a ListView with multicolumns into Settings.settings and load them upon running? I'm trying to save a ListView with 3 columns. How can I do that?
+1
A:
- Bind the listview to some data structure.
- Serialize is using xmlseriualizer - then you can save the result into the Settings.
Restoring is done using deserialize.
StringWriter output = new StringWriter(new StringBuilder());
XmlSerializer s = new XmlSerializer(this.GetType());
s.Serialize(output,this);
var result = output.ToString()
Dror Helper
2009-12-06 07:51:33
Got an example of how I can use XmlSerializer/Deserialize?
Kevin
2009-12-06 07:53:42
http://www.dotnetjohn.com/articles.aspx?articleid=173
Dror Helper
2009-12-06 08:24:22
Am I required to make an XML file?
Kevin
2009-12-06 08:37:14
No - you can save the xml to a string instead - see above
Dror Helper
2009-12-06 09:11:39