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
2349
Why won't my summary, actually SUM!!
posted

Here's the code, pretty much copied and pasted from Infragistics example:

 FYI, InitLayout event is fired during InitializeLayout of my base grid class.  The code all executes fine, the only problem is that my sum does not display any sum at all!

            public static void InitLayout(JWWinGrid grid) {
                if(!grid.DisplayLayout.Bands[0].Summaries.Exists("Total")){
                    grid.DisplayLayout.Bands[0].Summaries.Add("Total", Infragistics.Win.UltraWinGrid.SummaryType.Formula,
                    grid.DisplayLayout.Bands[0].Columns[_CUSTOMER_PRICE], Infragistics.Win.UltraWinGrid.SummaryPosition.UseSummaryPositionColumn);

                    grid.DisplayLayout.Bands[0].Summaries["Total"].Formula = "sum([" + _CUSTOMER_PRICE + "])";
                    grid.DisplayLayout.Bands[0].Summaries["Total"].DisplayFormat = "Total = {0}";
                }
            }

            public static void InitGrid(JWWinGrid grid) {

                grid.BindGrid(SalesOrderDataSource());

                Infragistics.Win.UltraWinCalcManager.NamedReference reference = new Infragistics.Win.UltraWinCalcManager.NamedReference();
                reference.Key = _CUSTOMER_PRICE;
                grid.CalcManager.NamedReferences.Add(reference);

                 .........

            } 

Parents Reply Children
No Data