D
Donovan
I can't believe this is causing me as much difficulty as it is, but I have
an Infragistics UltraTreeview control that I want to persist whatever the
user has in the tree. It has a method SaveAsXml which puts the contents into
a MemoryStream, which I convert to a string for persistance (I know
Infragistics allows me to, but I can't store as a file for various reasons,
so it's not a valid alternative). I'm using this code to put into a string
System.IO.MemoryStream oStream = new MemoryStream();
System.IO.StreamReader oReader = null;
String sXML="";
utrvContent.SaveAsXml(oStream); //saves the contents to a stream
oStream.Seek(0,System.IO.SeekOrigin.Begin);
oReader= new StreamReader((System.IO.Stream)oStream);
sXML= oReader.ReadToEnd();
So now I get this string and I need to load it into a stream to load back
into the tree control like this
utrvContent.LoadFromXml(oStream);
I can not figure out how to load the string I persisted into a MemoryStream.
Thanks in advance for any help.
an Infragistics UltraTreeview control that I want to persist whatever the
user has in the tree. It has a method SaveAsXml which puts the contents into
a MemoryStream, which I convert to a string for persistance (I know
Infragistics allows me to, but I can't store as a file for various reasons,
so it's not a valid alternative). I'm using this code to put into a string
System.IO.MemoryStream oStream = new MemoryStream();
System.IO.StreamReader oReader = null;
String sXML="";
utrvContent.SaveAsXml(oStream); //saves the contents to a stream
oStream.Seek(0,System.IO.SeekOrigin.Begin);
oReader= new StreamReader((System.IO.Stream)oStream);
sXML= oReader.ReadToEnd();
So now I get this string and I need to load it into a stream to load back
into the tree control like this
utrvContent.LoadFromXml(oStream);
I can not figure out how to load the string I persisted into a MemoryStream.
Thanks in advance for any help.