Group caption for summary row

Hi, How can i get the group caption to put it into the summary row? Thanks,

1 Reply

AD Administrator Syncfusion Team December 24, 2004 05:54 PM UTC

You could use QueryCellStyleInfo. In that event, you access the group using Dim group As GridGroup = e.TableCellIdentity.DisplayElement.ParentGroup From there you could get the group information like the Category or the child count. Here is a little snippet that displays some group information in a summary column named "sumCol3". (So, instead of showing the value of the sumCOl3 summary, it shows group informatiom.) Private Sub gridGroupingControl1_QueryCellStyleInfo(ByVal sender As Object, ByVal e As GridTableCellStyleInfoEventArgs) If e.TableCellIdentity.TableCellType = GridTableCellType.SummaryFieldCell AndAlso Not (e.TableCellIdentity.SummaryColumn Is Nothing) Then If e.TableCellIdentity.SummaryColumn.Name = "sumCol3" Then Dim group As GridGroup = e.TableCellIdentity.DisplayElement.ParentGroup e.Style.Text = String.Format("{2}={0} ({1} items)", group.Category, group.GetChildCount(), group.CategoryColumns(0).Name) End If End If End Sub

Loader.
Up arrow icon