Hi,
I have a WinGrid in which I am grouping by one column (fund in the attached image), although I am grouping I want to display this grid as if it has no grouping done. I want to show the sub total by grouped column. To do this I have set OutlookGroupBy on the grid and added the column in the sorted coulmn collection with group by parameter set. Also I set following properties
private void dgTrade_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e) { e.Layout.ViewStyleBand = ViewStyleBand.OutlookGroupBy; this.dgTrade.DisplayLayout.Bands[0].SortedColumns.Add("Fund", false, true); e.Layout.GroupByBox.Hidden = true; e.Layout.Override.HeaderPlacement= HeaderPlacement.FixedOnTop; }
GroupByRowExpansionStyle = Disabled;GroupByRowInitialExpansionState=Expanded;
I get the result as shown in the attached image. Is there a way to do the following
1) Hide the group Header Row (Where it says Fund: CCF (2 items)) [colored RED in the image]
2) Remove the Indentation [color: purple] so that Fund column perfectly left align to column header.
for first problem I tried the following code but did not worked
private void dgTrade_InitializeRow(object sender, InitializeRowEventArgs e) { if (e.Row.IsGroupByRow) { e.Row.Hidden = true; } }
For second part I tried
GroupByRowPadding=0;GroupByRowSpacingAfter=0;GroupByRowSpacingBefore=0;
Please advise.
dverma said:1) Hide the group Header Row (Where it says Fund: CCF (2 items)) [colored RED in the image]
No. You can hide the GroupByRow, but not without hiding the child rows.
dverma said:2) Remove the Indentation [color: purple] so that Fund column perfectly left align to column header.
band.IndentationGroupByRow = 0;
Thanks Mike,
Well if I cannot hide the GroupByRow without hiding the child rows, then is there a way to format the title of the GroupByRow currently saying Fund: EMM (3 Items)
Infragistics.Win.UltraWinGrid.Resources.Customizer.SetCustomizedString("LDR_Layout_mask", "[caption] : [value] ([count] records)");
or whatever you want ...
Hi everyone, i have a question about it.
How to remove the text (2 items) on those lines.
Thanks
No, there's is no way to have GroupByRows and regular rows in the same collection.
Hi Mike,
Can we group only few rows in grid? i.e. If I have 10 rows in grid can I group only 5 rows as one group and leave remaing 5 rows without grouping.
Yes, there's a couple of ways. You can use the GroupByRowDescriptionMask property, or you can handle the InitializeGroupByRow event and set the Description property.