//To add cell model in the grid.
this.gridGroupingControl1.TableModel.CellModels.Add("CustomSummary", new MyControlCellModel(this.gridGroupingControl1.TableModel));
//Event subscription
this.gridGroupingControl1.QueryCellStyleInfo += GridGroupingControl1_QueryCellStyleInfo;
//Event customization
private void GridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e)
{
if(e.TableCellIdentity != null && e.TableCellIdentity.TableCellType == GridTableCellType.GroupCaptionSummaryCell)
{
if (e.TableCellIdentity.ColIndex == 5)
e.Style.CellType = "CustomSummary";
}
} |