SR
Sri Rajan
Syncfusion Team
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.