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
close icon

Get summary in childgroup header

hy, i want if there is way to show the Sum ({Sum}) from a row summary in the childgroup header ({CategoryCaption}: {Category} - {RecordCount} - {Sum}) kind regards

2 Replies

AD Administrator Syncfusion Team January 27, 2006 03:05 AM UTC

Hi, here is some sample code that sets up a summary row, hides it and then references a summary in the caption text: GridSummaryRowDescriptor groupCaptionSummaryRow = new GridSummaryRowDescriptor("GroupCaption"); groupCaptionSummaryRow.Visible = false; GridSummaryColumnDescriptor countSummaryColumnDescriptor = new GridSummaryColumnDescriptor("CaptionCount"); countSummaryColumnDescriptor.SummaryType = SummaryType.Count; countSummaryColumnDescriptor.DataMember = "(Record)"; groupCaptionSummaryRow.SummaryColumns.Add(countSummaryColumnDescriptor); this.groupingGrid1.TableDescriptor.SummaryRows.Add(groupCaptionSummaryRow); this.groupingGrid1.ChildGroupOptions.CaptionText = "{CategoryName}: {Category} - {RecordCount} Items CustomSummary={GroupCaption.CaptionCount}"; this.groupingGrid1.TopLevelGroupOptions.CaptionText = "{TableName}: {RecordCount} Items CustomSummary={GroupCaption.CaptionCount}"; Stefan


AD Administrator Syncfusion Team January 27, 2006 03:34 PM UTC

hi, stefan let me tell that your are a good guy, this is work perfectly. kind regards. >Hi, > >here is some sample code that sets up a summary row, hides it and then references a summary in the caption text: > > > GridSummaryRowDescriptor groupCaptionSummaryRow = new GridSummaryRowDescriptor("GroupCaption"); > groupCaptionSummaryRow.Visible = false; > GridSummaryColumnDescriptor countSummaryColumnDescriptor = new GridSummaryColumnDescriptor("CaptionCount"); > countSummaryColumnDescriptor.SummaryType = SummaryType.Count; > countSummaryColumnDescriptor.DataMember = "(Record)"; > groupCaptionSummaryRow.SummaryColumns.Add(countSummaryColumnDescriptor); > this.groupingGrid1.TableDescriptor.SummaryRows.Add(groupCaptionSummaryRow); > > this.groupingGrid1.ChildGroupOptions.CaptionText = "{CategoryName}: {Category} - {RecordCount} Items CustomSummary={GroupCaption.CaptionCount}"; > this.groupingGrid1.TopLevelGroupOptions.CaptionText = "{TableName}: {RecordCount} Items CustomSummary={GroupCaption.CaptionCount}"; > > > >Stefan >

Loader.
Live Chat Icon For mobile
Up arrow icon