Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
455
WinGrid: OutlookGroupBy and Hiding Grouped Row and Removing Indentation
posted

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.