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

render grid based on XML / XSD

is there anyway i can take an XML document or an XSD document and have it auto render the grid based on these fields of data. this would included combo box dropdowns, etc . . thanks, ak

9 Replies

AD Administrator Syncfusion Team July 5, 2005 02:10 AM

Our GridGroupingControl supports using XML schema. Take a look at this sample. \Syncfusion\Essential Studio\3.2.1.0\Windows\Grid.Windows\Samples\Grouping\CategoryView.


AD Administrator Syncfusion Team July 5, 2005 08:20 AM

Does this work for the regular GridControl? -ak >Our GridGroupingControl supports using XML schema. Take a look at this sample. \Syncfusion\Essential Studio\3.2.1.0\Windows\Grid.Windows\Samples\Grouping\CategoryView.


AD Administrator Syncfusion Team July 5, 2005 11:25 AM

Those particular calls do not, but you can serialize the GridData object from a GridControl out to XML. Here is a forum thread with a sample link in it. http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=23609


AD Administrator Syncfusion Team July 5, 2005 11:47 AM

how is this different from: this.gridControl1.Model.SaveSoap(@"C:\grid.xml"); this.grid2 = new GridControl(GridModel.LoadSoap(@"C:\grid.xml")); thanks, ak >Those particular calls do not, but you can serialize the GridData object from a GridControl out to XML. Here is a forum thread with a sample link in it. > >http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=23609


AD Administrator Syncfusion Team July 5, 2005 12:10 PM

One uses XML serialization through the FrameWorks''''s System.Xml.Serialization.XmlSerializer class. And the other uses the System.Runtime.Serialization.Formatters.Soap.SoapFormatter class that outputs SOAP which should conform to special protocols that are part of SOAP.


AD Administrator Syncfusion Team July 5, 2005 02:29 PM

OK, so I am using the XML serialization. I am saving from one grid to an XML file and using that file to refresh another grid. All of the data and colors are correct but the column widths are not the same. Can you please help. thanks, ak >One uses XML serialization through the FrameWorks''''s System.Xml.Serialization.XmlSerializer class. > >And the other uses the System.Runtime.Serialization.Formatters.Soap.SoapFormatter class that outputs SOAP which should conform to special protocols that are part of SOAP. > >


AD Administrator Syncfusion Team July 5, 2005 02:31 PM

Actually its not just the column width. Also, 1. The font size is different. 2. The first column is being displayed on the second grid where this was not being displayed on the first grid. thanks, ak >OK, so I am using the XML serialization. I am saving from one grid to an XML file and using that file to refresh another grid. > >All of the data and colors are correct but the column widths are not the same. Can you please help. > >thanks, > >ak > > >>One uses XML serialization through the FrameWorks''''s System.Xml.Serialization.XmlSerializer class. >> >>And the other uses the System.Runtime.Serialization.Formatters.Soap.SoapFormatter class that outputs SOAP which should conform to special protocols that are part of SOAP. >> >>


AD Administrator Syncfusion Team July 5, 2005 06:24 PM

The built-in direct XML support only works with our GridData object. If you want to save the whole grid, your options are GridModel.LoadBinary/SaveBinary or GridModel.LoadSoap/SaveSoap. Here are button handlers that load a save SOAP. This will serialize the whole grid including colwidths and basestyles. //load private void button1_Click(object sender, System.EventArgs e) { gridControl1.Model = GridModel.LoadSoap(@"c:\testXML.xml"); this.gridControl1.Refresh(); } //save private void button2_Click(object sender, System.EventArgs e) { gridControl1.Model.SaveSoap(@"c:\testXML.xml"); }


AK Adam K. July 5, 2005 10:50 PM

thanks for your help >The built-in direct XML support only works with our GridData object. If you want to save the whole grid, your options are GridModel.LoadBinary/SaveBinary or GridModel.LoadSoap/SaveSoap. > >Here are button handlers that load a save SOAP. This will serialize the whole grid including colwidths and basestyles. > > >//load >private void button1_Click(object sender, System.EventArgs e) >{ > gridControl1.Model = GridModel.LoadSoap(@"c:\testXML.xml"); > this.gridControl1.Refresh(); >} > >//save >private void button2_Click(object sender, System.EventArgs e) >{ > gridControl1.Model.SaveSoap(@"c:\testXML.xml"); >} >

Loader.
Live Chat Icon For mobile
Up arrow icon