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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Group caption for summary row

Thread ID:





22807 Dec 22,2004 07:17 PM UTC Dec 24,2004 05:54 PM UTC WinForms 1
Tags: Grouping
Bernard Herrok
Asked On December 22, 2004 07:17 PM UTC

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

Administrator [Syncfusion]
Replied On 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


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon

Live Chat Icon For mobile
Live Chat Icon