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

Get Summary data from Child table

Thread ID:

Created:

Updated:

Platform:

Replies:

76384 Sep 4,2008 10:39 AM UTC Sep 4,2008 12:35 PM UTC WinForms 1
loading
Tags: Grouping
Ankit Thakkar
Asked On September 4, 2008 10:39 AM UTC

I have mapped a parent child table to my gridgrouping control so that each of my parent record has got a child table in tree view format.

Now, I have a requirement to get the summary row value from my child table and use it in my parent record data calculation.

Can you help me in this..

Many Thanks..




Sri Rajan [Syncfusion]
Replied On September 4, 2008 12:35 PM UTC

Hi Ankit,

Thank you for your interest in Syncfusion products.

You can get the summary row information by using GridEngine.SummaryText(). Please refer to following code that shows you how to get the summary row information.


foreach (GridSummaryColumnDescriptor scd in sr.SummaryRowDescriptor.SummaryColumns)
{
string result = GridEngine.GetSummaryText(sr.ParentGroup, scd);
Console.WriteLine("GroupLevel = {0}, SummaryColumns_Name = {1}, Value = {2}", sr.GroupLevel, scd.Name, result);
}


One other way you can do this is by using the below code


int rowIndex = gridGroupingControl1.Table.NestedDisplayElements.IndexOf(summaryRow);
GridTableDescriptor tableDescriptor = null;
foreach (GridSummaryColumnDescriptor scd in summaryRow.SummaryRowDescriptor.SummaryColumns)
{
tableDescriptor = scd.TableDescriptor;
int fieldIndex = tableDescriptor.NameToField(scd.DataMember);
int colIndex = scd.TableDescriptor.FieldToColIndex(fieldIndex);

Console.WriteLine(gridGroupingControl1.TableModel[rowIndex, colIndex].CellValue);
}


Please let me know if this helps.

Best Regards,
Srirajan.


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

;