I want a simple totals row at the bottom of the grid. No "Sum =" in the cell, just the total of all the cells in that column. Hopefully the whole row would be in bold font.
I've got the summaries displaying the correct values, in the correct places, except there are two summary rows, one that contains the SummaryFooterCaption, and one that contains the summary values. Can I get the values on the same row as the caption?
If I could just get rid of the "Sum =", and move the values up a row, I'd be a happy camper (for now :).
Later
Art
Hello Art,
I think that I achieved something similar to what you are looking for. I have used the InitializeLayout event of the UltraGrid and set the following properties there:
private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e) { // Allowing Summaries in the UltraGrid e.Layout.Override.AllowRowSummaries = AllowRowSummaries.True; // Setting the Sum Summary for the desired column e.Layout.Bands[0].Summaries.Add("sumarryKey",SummaryType.Sum,e.Layout.Bands[0].Columns["Int"]); //Set the display format to be just the number e.Layout.Bands[0].Summaries["sumarryKey"].DisplayFormat = "{0}"; //Hide the SummaryFooterCaption row e.Layout.Bands[0].Override.SummaryFooterCaptionVisible = Infragistics.Win.DefaultableBoolean.False;}
Please let me know if this approach help in your scenario.
Thanks - it's working almost perfectly now. This forum is great!
Last question - I have added a column that uses a formula based on other columns. Long story short - Can I change the "#DIV/0!" to something else, even "0", when I get a divide by zero error?
Thanks again.
I am just checking the progress of your issue.
If you need any additional assistance please do not hesitate to contact us.
Hello ArtWebb,
You probably could use a Formula like the following one:
"if( [Int]=0 , 0 , 100/[Int] )" , where the [Int] is the colum that might have 0 values, and if that's true, I am going to populate the desired cells with 0-s, if that's not the case, the Formula would be following one - 100/[Int]. Please feel free to let me know if this is what you are looking for.