MultiRow Windows Forms > Developer's Guide > Using MultiRow > File Input and Output > Input and Output of Template XML |
MultiRow can store and load templates as XML files. Since the XML file is a text file, it can be viewed using a text editor or an XML editor and the changes or differences can be checked directly.
The template can be saved to an XML file while it is in an edit state in the designer. You can load an XML file that was saved with the Template.Save method. Use the following steps to save templates being edited in the designer as XML files.
Use the following steps to load a template from an XML file in the designer.
Use the Template.Save method to save the displayed contents of the GcMultiRow control as an XML file.
If there is a file with the same name as that of the file specified with the Template.Save method, the existing file is overwritten. |
This example saves a file.
GcMultiRow1.Template.Save("filename.xml") |
gcMultiRow1.Template.Save(@"filename.xml"); |
The Template.Load method is used to load an XML file as a template of the GcMultiRow control.
The System.FormatException exception is thrown if an XML file with an incorrect format is specified. |
This example loads a file.
GcMultiRow1.Template.Load("filename.xml") |
gcMultiRow1.Template.Load(@"filename.xml"); |