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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

render grid based on XML / XSD

Thread ID:

Created:

Updated:

Platform:

Replies:

31271 Jul 5,2005 02:08 AM UTC Jul 6,2005 03:50 AM UTC Windows Forms 9
loading
Tags: GridControl
Adam K.
Asked On July 5, 2005 02:08 AM UTC

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

Administrator [Syncfusion]
Replied On July 5, 2005 07:10 AM UTC

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.

Administrator [Syncfusion]
Replied On July 5, 2005 01:20 PM UTC

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.

Administrator [Syncfusion]
Replied On July 5, 2005 04:25 PM UTC

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

Administrator [Syncfusion]
Replied On July 5, 2005 04:47 PM UTC

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

Administrator [Syncfusion]
Replied On July 5, 2005 05:10 PM UTC

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.

Administrator [Syncfusion]
Replied On July 5, 2005 07:29 PM UTC

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. > >

Administrator [Syncfusion]
Replied On July 5, 2005 07:31 PM UTC

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. >> >>

Administrator [Syncfusion]
Replied On July 5, 2005 11:24 PM UTC

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"); }

Adam K.
Replied On July 6, 2005 03:50 AM UTC

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"); >} >

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;