We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Group caption for summary row

Thread ID:





22807 Dec 22,2004 02:17 PM Dec 24,2004 12:54 PM Windows Forms 1
Tags: Grouping
Bernard Herrok
Asked On December 22, 2004 02:17 PM

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

Administrator [Syncfusion]
Replied On December 24, 2004 12:54 PM

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


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.