Hi,
I've been using custom Group Descriptors on my RadGridView so I can specify the order the groups are sorted into however on these custom groups, (an example of how I create the descriptor is below), the column aggregates do not show. But if I do not override the group descriptor the column aggregates show on the row groups correctly. Is it possible for me to show these aggregate values on my custom groups?
Thanks for your help!!
01.private GroupDescriptor<PnlPosition, string, DateTime> GetInstrumentIdGroupDescriptor(ListSortDirection dir)02. {03. var descriptor = new GroupDescriptor<PnlPosition, string, DateTime>04. {05. GroupingExpression = o => o.InstrumentId.ToString(),06. GroupSortingExpression = group => group.ElementAt(0).Expiry.Value,07. SortDirection = dir,08. DisplayContent = "InstrumentId",09. };10. return descriptor;11. }12. 13. private void PositionResultsGridView_Grouping(object sender, Telerik.Windows.Controls.GridViewGroupingEventArgs e)14. {15. if (e.Action == GroupingEventAction.Place)16. { 17. var columnGroup = e.GroupDescriptor as ColumnGroupDescriptor;18. if (columnGroup != null && columnGroup.Column.UniqueName == "InstrumentId")19. {20. // cancel the default grouping21. e.Cancel = true;22. var descriptor = GetInstrumentIdGroupDescriptor(e.GroupDescriptor.SortDirection ?? ListSortDirection.Descending);23. 24. //descriptor.AggregateFunctions = columnGroup.A25. // add the new descriptor26. ((RadGridView)sender).GroupDescriptors.Add(descriptor);27. }28. else if (columnGroup != null && columnGroup.Column.UniqueName == "Underlying")29. {30. // cancel the default grouping31. e.Cancel = true;32. // add the new descriptor33. var descriptor = GetUnderlyingGroupDescriptor(e.GroupDescriptor.SortDirection ?? ListSortDirection.Descending);34. ((RadGridView)sender).GroupDescriptors.Add(descriptor);35. }36. }37. }
