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
3555
problem with summaries etc.
posted

I am having a problem with trying to set summation summaries on just the columns in the for loop.  It sets them, however, I somehow get 2 rows of of grand totals.  My code is below.  If I don't use my code then it does give me the one grand total line. Also, I don't want to have summaries on any of my other columns, but the AllowRowSummaries.BasedOnDataType turn that on for the other ones as well. Can I prevent that?

Here is a picture and some text explaining when that happens.

http://i247.photobucket.com/albums/gg152/peryan77/repeattotals.jpg

 

private void ultraGridSales_InitializeLayout(object sender, InitializeLayoutEventArgs e)

{

//Set Sum on Sales Columns

e.Layout.Override.AllowRowSummaries = AllowRowSummaries.BasedOnDataType;

for (int i = 5; i < ColumnCount; i++)

{

//Format

band.ColumnsIdea.Format = "$#,##0.00";

band.ColumnsIdea.CellAppearance.TextHAlign = Infragistics.Win.HAlign.Right;

//Summaries

band.Summaries.Add(SummaryType.Sum,band.ColumnsIdea);

}}