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

GGC to XML

Thread ID:

Created:

Updated:

Platform:

Replies:

32614 Aug 4,2005 02:14 PM UTC Aug 20,2005 01:37 AM UTC Windows Forms 6
loading
Tags: GridControl
Lan
Asked On August 4, 2005 02:14 PM UTC

Hello, Is there any generic way to export GGC data to XML? Assuming the GGC is bound to any single flat (no any primary-foreign realtionship)table, user can grag-grop any columns to group them, add any AVG/MIN/Max/Sum to any numeric columns. the ExportToXML function will export grid''s column headers, nested groups and row/Summary datas belong to each group. any samples? Thanks, lan

Administrator [Syncfusion]
Replied On August 7, 2005 10:23 PM UTC

Hi Lan, We have planned export and import to xml. The idea is to be able to export groups and summaries as xml and also read back those exported values in a different grid and display those values in a grouping grid without the original underlying data being available. But this will take some more time until it is ready. If you only want to export the data without and you are not interested in importing them back this is less work. If export-only is something you are interested in I''ll put together a sample that creates strong typed collections of records with values and summary rows with values and then export the collection to xml using a XmlSerializer. Let me know what you need. Thanks, Stefan >Hello, >Is there any generic way to export GGC data to XML? > >Assuming the GGC is bound to any single flat (no any primary-foreign realtionship)table, >user can grag-grop any columns to group them, add any AVG/MIN/Max/Sum to any numeric columns. > >the ExportToXML function will export grid''s column headers, nested groups and row/Summary datas belong to each group. > >any samples? > >Thanks, >lan > >

Lan
Replied On August 10, 2005 01:43 PM UTC

Hello Stefan, Yes, I only want to export the data without style/formatting, and not interested in importing them back. The real rason I want to export to xml is that I want to apply xlst on the xml to do HTML reporting. It''ll be very helpful if you could put exporting-xml-only to a sample. Thanks, Lan

Lan
Replied On August 15, 2005 06:23 PM UTC

Hello, I want export-only(no read back) function. I''ll appreciate if you could provide me a sample. Thanks, lan >Hi Lan, > >We have planned export and import to xml. The idea is to be able to export groups and summaries as xml and also read back those exported values in a different grid and display those values in a grouping grid without the original underlying data being available. > >But this will take some more time until it is ready. > >If you only want to export the data without and you are not interested in importing them back this is less work. If export-only is something you are interested in I''ll put together a sample that creates strong typed collections of records with values and summary rows with values and then export the collection to xml using a XmlSerializer. > >Let me know what you need. > >Thanks, >Stefan > > >>Hello, >>Is there any generic way to export GGC data to XML? >> >>Assuming the GGC is bound to any single flat (no any primary-foreign realtionship)table, >>user can grag-grop any columns to group them, add any AVG/MIN/Max/Sum to any numeric columns. >> >>the ExportToXML function will export grid''s column headers, nested groups and row/Summary datas belong to each group. >> >>any samples? >> >>Thanks, >>lan >> >>

Administrator [Syncfusion]
Replied On August 15, 2005 10:24 PM UTC

Here is a minimal sample that uses an XmlTextWriter class to write out a well-formed Xml file holdong the visible data in the grid. http://www.syncfusion.com/Support/user/uploads/GGC_XML_7543d81d.zip

Lan
Replied On August 19, 2005 08:21 PM UTC

Hello, My version is 3.2.1.0. When I compile your sample. got following errors: C:\temp\GGC_XML_7543d81d\GGC_XML\Form1.cs(188): ''Syncfusion.Windows.Forms.Grid.Grouping.GridRecordRow'' does not contain a definition for ''GetRecord'' C:\temp\GGC_XML_7543d81d\GGC_XML\Form1.cs(187): ''Syncfusion.Windows.Forms.Grid.Grouping.GridRecordRow'' does not contain a definition for ''GetRecord'' Any idea? >Here is a minimal sample that uses an XmlTextWriter class to write out a well-formed Xml file holdong the visible data in the grid. > >http://www.syncfusion.com/Support/user/uploads/GGC_XML_7543d81d.zip >

Administrator [Syncfusion]
Replied On August 20, 2005 01:37 AM UTC

That sample was done using the 3.3 RC. In 3.2.1, use code like this:
private void WriteGridRecordRow(GridRecordRow grr, XmlTextWriter xw)
{
	xw.WriteStartElement("Record");
	foreach(FieldDescriptor fd in grr.ParentTableDescriptor.Fields)
	{
		GridRecord rec =  grr.ParentGroup.Records[0] as GridRecord;
		if(rec != null)
			xw.WriteElementString(fd.Name, rec.GetValue(fd).ToString());
	}
	xw.WriteEndElement();
}

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

;