Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
22807 | Dec 22,2004 07:17 PM UTC | Dec 24,2004 05:54 PM UTC | WinForms | 1 |
![]() |
Tags: Grouping |
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.
This page will automatically be redirected to the sign-in page in 10 seconds.