We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Load xml error

1. I save gridControl in "ComboBox Cell Demo " example into test.xml, then i drag one another gridcontrol into form such as Grid2, i change Grid2 to Edit form, (click right button , select Edit) , i load the test.xml. Build successful, but run error , please see image . Thanks



errorload_a1bb0e18.zip

1 Reply

RC Rajadurai C Syncfusion Team April 9, 2009 12:16 PM UTC

Hi,

Thanks for your interest in Syncfusion products.

With the provided steps, i tried to reproduce the issue with the ComboBox Cell Demo sample. But the saved xml file of first grid get loaded into second grid without throwing any error. Please refer to the following code which is used for XML serialization/deserialization.

//Xml Deserialization
FileDialog dlg = new OpenFileDialog();
dlg.Filter = "Xml files (*.xml)|*.xml|All files (*.*)|*.*";
if (dlg.ShowDialog() == DialogResult.OK)
{
try
{
this.Cursor = Cursors.WaitCursor;
this.gridControl2.InitializeFromXml(dlg.FileName);
this.gridControl2.Refresh();
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
finally
{
this.Cursor = Cursors.Default;
}
}

//Xml Serialization
FileDialog dlg = new SaveFileDialog();
dlg.Filter = "Xml files (*.xml)|*.xml|All files (*.*)|*.*";
if (dlg.ShowDialog() == DialogResult.OK)
{
try
{
this.Cursor = Cursors.WaitCursor;
this.gridControl1.SaveXml(dlg.FileName);
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
finally
{
this.Cursor = Cursors.Default;
}
}


Please let me know if this helps. If not, please provide more details on the modified code (if used) in application.

Regards,
Rajadurai


Loader.
Live Chat Icon For mobile
Up arrow icon