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.

Get Summary data from Child table

Thread ID:





76384 Sep 4,2008 06:39 AM Sep 4,2008 08:35 AM Windows Forms 1
Tags: Grouping
Ankit Thakkar
Asked On September 4, 2008 06:39 AM

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 08:35 AM

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,


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.

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.