this.gridGroupingControl1.Appearance.SummaryFieldCell.BackColor = this.gridGroupingControl1.Appearance.RecordFieldCell.BackColor;
this.gridGroupingControl1.Appearance.SummaryFieldCell.Borders.Top = new GridBorder(GridBorderStyle.Standard);
private void gridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e)
{
if(e.TableCellIdentity.TableCellType == GridTableCellType.SummaryFieldCell
&& e.TableCellIdentity.SummaryColumn != null)
{
if (e.TableCellIdentity.SummaryColumn.Name == "Sum1")
{
Group g = e.TableCellIdentity.DisplayElement.ParentGroup;
if (g.IsMainGroup)
{
e.Style.Text = null;//some value
}
}
}
}
private void button1_Click(object sender, EventArgs e)
{
foreach (Element el in gridGroupingControl1.Table.DisplayElements)
{
GridRecordRow grr = el as GridRecordRow;
if (grr != null)
{
Console.WriteLine("Col1 = {0}", grr.GetRecord().GetValue("Col1"));
}
else
{
GridSummaryRow sr = el as GridSummaryRow;
if (sr != null)
{
foreach (GridSummaryColumnDescriptor scd in sr.SummaryRowDescriptor.SummaryColumns)
{
Console.WriteLine("{0} = {1}", scd.Name, GridEngine.GetSummaryText(sr.ParentGroup, scd));
}
}
}
}
}