VB: Me.gridGroupingControl1.QueryCellStyleInfo += gridGroupingControl1_QueryCellStyleInfo Public Sub gridGroupingControl1_QueryCellStyleInfo(sender As Object, e As GridTableCellStyleInfoEventArgs) Select Case e.TableCellIdentity.TableCellType Case GridTableCellType.GroupCaptionSummaryCell If True Then If e.TableCellIdentity.SummaryColumn IsNot Nothing AndAlso e.TableCellIdentity.SummaryColumn.Name = "Sum3" Then Dim row As GridSummaryRow = TryCast(e.TableCellIdentity.DisplayElement, GridSummaryRow) e.Style.CellType = GridCellTypeName.FormulaCell e.Style.CellValue = "=5+5"//Required Formula End If Exit Select End If End Select End Sub |
VB: Me.gridGroupingControl1.QueryCellStyleInfo += gridGroupingControl1_QueryCellStyleInfo Public Sub gridGroupingControl1_QueryCellStyleInfo(sender As Object, e As GridTableCellStyleInfoEventArgs) Select Case e.TableCellIdentity.TableCellType Case GridTableCellType.GroupCaptionSummaryCell If True Then If e.TableCellIdentity.SummaryColumn IsNot Nothing AndAlso e.TableCellIdentity.SummaryColumn.Name = "Sum3" Then Dim row As GridSummaryRow = TryCast(e.TableCellIdentity.DisplayElement, GridSummaryRow) e.Style.CellType = GridCellTypeName.FormulaCell e.Style.CellValue = "=5+5"//Required Formula End If Exit Select End If End Select End Sub |