Hello!
I have attached a file showing the result that I am looking for..
I have two different tables, on eparent (Elements) and one child (Products).
I first create one dataset and then i put and the parent table, then the child table and last of all I create the relation between them. The I add this dataset to the DataSource property of the UltraGrid and do the Binding. The result will be according to the picture on the left side.
I have added some summary code giving me tha original summary appearance in the second Band according to the appearance when it is loaded.
Me.ug.DisplayLayout.Override.AllowRowSummaries = Infragistics.Win.UltraWinGrid.AllowRowSummaries.False Me.ug.DisplayLayout.Override.SummaryDisplayArea = Infragistics.Win.UltraWinGrid.SummaryDisplayAreas.Bottom Me.ug.DisplayLayout.Override.SummaryFooterCaptionVisible = Infragistics.Win.DefaultableBoolean.False
Me.ug.DisplayLayout.Bands(1).Summaries.Add("WeightTotal", Infragistics.Win.UltraWinGrid.SummaryType.Sum, Me.ug.DisplayLayout.Bands(1).Columns("WeightTotal"), Infragistics.Win.UltraWinGrid.SummaryPosition.UseSummaryPositionColumn) Me.ug.DisplayLayout.Bands(1).Summaries.Item(1).DisplayFormat = "{0:" & WeightFormat & Chr(32) & "}" Me.ug.DisplayLayout.Bands(1).Summaries.Item(1).Appearance.TextHAlign = Infragistics.Win.HAlign.Right
When I later use the groupby option, and dragging the column ModuleID to the groupby area, I would like to have the weighttotal for all the elements in that Module to be summarized according to the position in the image on the right hand side...
Can this behavior be achived?
Thanks for the help!
/Henrik
Hi Henrik,
It sounds like you need to change the SummaryDisplayArea to include the group by rows.
Me.ug.DisplayLayout.Override.SummaryDisplayArea = Infragistics.Win.UltraWinGrid.SummaryDisplayAreas.Bottom | Infragistics.Win.UltraWinGrid.SummaryDisplayAreas.InGroupByRows;
And also, you will want to set the GroupByRowSummaryDisplayStyle to SummaryCells.
Is there any way to achieve this functionality with the UltraWebGrid?
Hello Mike!
Thanks for the answer...
The solution you described works alright, but unfortunately not in my code... ;-)I created a small example code to try your solution and it worked perfect. I built up a DataSource by the use of a single DataTable. The summaries at row-level was included...
I think that the problem in my solution is realted to the relation that I have between two different datatables. I have tried to generate a windows form class showing you what I mean. I think that it should work directly if you implement it in a windows application project...
What I am looking for here, is that when you drag and drop the ElementID column in the group by area. Then I want the group by rows to implement the summaries as well. I understand that this will be difficult since the Weight and the Price Columns isn't implemented in that Band/DataTable...
But my question is, can this be done in some way?