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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

how to grab the values in the aggregated values from the group caption rows ?

Thread ID:

Created:

Updated:

Platform:

Replies:

88449 Jul 23,2009 03:44 PM UTC Jul 28,2009 02:03 PM UTC WinForms 3
loading
Tags: GridControl
David Cui
Asked On July 23, 2009 03:44 PM UTC



in GGC, how to programatically grab the values in the aggregated values from the group caption rows ?

david

Rajadurai C [Syncfusion]
Replied On July 24, 2009 03:17 PM UTC

Hi David,

Thanks for your interest in Syncfusion Products.

From the update, it seems you are displaying summary in group caption. If it is, the aggregated value can be accessed from the caption summary through the GetSummaryText method of GridEngine. Here is the code for your reference handled in QueryCellStyleInfo event which retrieves the summary text from caption summary row.

if (e.TableCellIdentity.TableCellType == GridTableCellType.GroupCaptionSummaryCell)
{
Group g = e.TableCellIdentity.DisplayElement.ParentGroup;
if (g != null)
Console.WriteLine(GridEngine.GetSummaryText(g, scd));
}


Regards,
Rajadurai

David Cui
Replied On July 27, 2009 02:25 PM UTC


Thanks, Rajadurai,

Another Question: is there possible or easier way to export all of the summary values into a DataTable ? In another word, I don't need the record fields (details), ONLY need the summary values like a collapsed view (like export data to PDF/CSV for only viewable columns/rows) .

The purpose is to i want to get such values in DataTable format in order to fit to other reports.


best,

David

Rajadurai C [Syncfusion]
Replied On July 28, 2009 02:03 PM UTC

Hi David,

Thanks for your update.

In gridgroupingcontrol, you can export the summary view(collapsed view) to excel sheet using GroupingGridExcelConverterControl or save it to XML file and restore it back in grid using the following code.

this.gridGroupingControl1.Engine.InitializeFrom(GridEngine.CreateFromXml(xr));//xr is XmlReader object
this.gridGroupingControl1.WriteXmlSchema(xw);//xw is XmlTextWriter object

But it is not possible to save it in datatable format.

Please let me know if you have any further queries.

Regards,
Rajadurai

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

;