Hi,
I have an UltraGrid with several columns and on certain columns I have enabled Row Summaries.
I would like to remove the button that allows to user to select which summary to display while keeping the summary down at the bottom of my grid.
I have attached a picture of a column that does not display the summary button.
Do you know how to do this?
From the Override object, set the AllowRowSummaries property to False (Infragistics.Win.UltraWinGrid.AllowRowSummaries.False).
You can find an Override object connected to the DisplayLayout (to apply to all bands in the grid) and connected to each individual band (to apply to that individual band).
I tried what you suggested but it appeared to have no effect.
Here is a snippet of my code:
Dim UltraGridBand1 As Infragistics.Win.UltraWinGrid.UltraGridBand = New Infragistics.Win.UltraWinGrid.UltraGridBand("UltraGridBand1", -1)Dim UltraGridColumn1 As Infragistics.Win.UltraWinGrid.UltraGridColumn = New Infragistics.Win.UltraWinGrid.UltraGridColumn("Edit")Dim UltraGridColumn2 As Infragistics.Win.UltraWinGrid.UltraGridColumn = New Infragistics.Win.UltraWinGrid.UltraGridColumn("Name")Dim UltraGridColumn3 As Infragistics.Win.UltraWinGrid.UltraGridColumn = New Infragistics.Win.UltraWinGrid.UltraGridColumn("Planned")Dim UltraGridColumn4 As Infragistics.Win.UltraWinGrid.UltraGridColumn = New Infragistics.Win.UltraWinGrid.UltraGridColumn("PercentChange")Dim UltraGridColumn5 As Infragistics.Win.UltraWinGrid.UltraGridColumn = New Infragistics.Win.UltraWinGrid.UltraGridColumn("Projected")Dim UltraGrid1 = New Infragistics.Win.UltraWinGrid.UltraGrid
Dim Appearance1 As Infragistics.Win.Appearance = New Infragistics.Win.AppearanceDim Appearance2 As Infragistics.Win.Appearance = New Infragistics.Win.AppearanceDim Appearance3 As Infragistics.Win.Appearance = New Infragistics.Win.AppearanceDim Appearance4 As Infragistics.Win.Appearance = New Infragistics.Win.Appearance Dim SummarySettings1 As Infragistics.Win.UltraWinGrid.SummarySettings = New Infragistics.Win.UltraWinGrid.SummarySettings("SalesSummary", Infragistics.Win.UltraWinGrid.SummaryType.Sum, Nothing, "Planned", 1, True, "DataSource1", 0, Infragistics.Win.UltraWinGrid.SummaryPosition.UseSummaryPositionColumn, "Planned", 1, True)Dim SummarySettings2 As Infragistics.Win.UltraWinGrid.SummarySettings = New Infragistics.Win.UltraWinGrid.SummarySettings("PercentChangeSummary", Infragistics.Win.UltraWinGrid.SummaryType.Formula, Nothing, "PercentChange", 2, True, "DataSource1", 0, Infragistics.Win.UltraWinGrid.SummaryPosition.UseSummaryPositionColumn, "PercentChange", 2, True)Dim SummarySettings3 As Infragistics.Win.UltraWinGrid.SummarySettings = New Infragistics.Win.UltraWinGrid.SummarySettings("ProjectedSummary", Infragistics.Win.UltraWinGrid.SummaryType.Sum, Nothing, "ProjectedSales", 3, True, "DataSource1", 0, Infragistics.Win.UltraWinGrid.SummaryPosition.UseSummaryPositionColumn, "Projected", 3, True) UltraGridColumn1.CellButtonAppearance = Appearance1UltraGridColumn1.Header.Caption = ""UltraGridColumn1.Style = Infragistics.Win.UltraWinGrid.ColumnStyle.ButtonUltraGridColumn1.Width = 20UltraGridColumn2.Width = 170UltraGridColumn3.AllowRowSummaries = Infragistics.Win.UltraWinGrid.AllowRowSummaries.[True]UltraGridColumn4.AllowRowSummaries = Infragistics.Win.UltraWinGrid.AllowRowSummaries.[True]UltraGridColumn4.Header.Caption = "% Change"UltraGridColumn5.AllowRowSummaries = Infragistics.Win.UltraWinGrid.AllowRowSummaries.[True]Appearance1.Image = Global.My.Resources.Resources.Lookup_EditAppearance1.ImageHAlign = Infragistics.Win.HAlign.CenterUltraGridBand1.Columns.AddRange(New Object() {UltraGridColumn1, UltraGridColumn2, UltraGridColumn3, UltraGridColumn4, UltraGridColumn5})UltraGridBand1.Override.AllowRowSummaries = Infragistics.Win.UltraWinGrid.AllowRowSummaries.[False] SummarySettings1.DisplayFormat = "{0:$0}"SummarySettings1.GroupBySummaryValueAppearance = Appearance2SummarySettings1.SummaryDisplayArea = Infragistics.Win.UltraWinGrid.SummaryDisplayAreas.BottomSummarySettings2.DisplayFormat = "{0:0%}"SummarySettings2.GroupBySummaryValueAppearance = Appearance3SummarySettings2.SummaryDisplayArea = Infragistics.Win.UltraWinGrid.SummaryDisplayAreas.BottomSummarySettings3.DisplayFormat = "{0:$0}"SummarySettings3.GroupBySummaryValueAppearance = Appearance4SummarySettings3.SummaryDisplayArea = Infragistics.Win.UltraWinGrid.SummaryDisplayAreas.Bottom UltraGridBand1.Summaries.AddRange(New Infragistics.Win.UltraWinGrid.SummarySettings() {SummarySettings1, SummarySettings2, SummarySettings3})UltraGridBand1.SummaryFooterCaption = "Total"UltraGrid1.DisplayLayout.BandsSerializer.Add(UltraGridBand1)UltraGrid1.DisplayLayout.Override.AllowRowSummaries = Infragistics.Win.UltraWinGrid.AllowRowSummaries.[False] UltraGrid1.Location = New System.Drawing.Point(0, 0)UltraGrid1.Name = "UltraGrid1"UltraGrid1.Size = New System.Drawing.Size(942, 377) Me.Controls.Add(UltraGrid1)
Dim Appearance1 As Infragistics.Win.Appearance = New Infragistics.Win.AppearanceDim Appearance2 As Infragistics.Win.Appearance = New Infragistics.Win.AppearanceDim Appearance3 As Infragistics.Win.Appearance = New Infragistics.Win.AppearanceDim Appearance4 As Infragistics.Win.Appearance = New Infragistics.Win.Appearance
Dim SummarySettings1 As Infragistics.Win.UltraWinGrid.SummarySettings = New Infragistics.Win.UltraWinGrid.SummarySettings("SalesSummary", Infragistics.Win.UltraWinGrid.SummaryType.Sum, Nothing, "Planned", 1, True, "DataSource1", 0, Infragistics.Win.UltraWinGrid.SummaryPosition.UseSummaryPositionColumn, "Planned", 1, True)Dim SummarySettings2 As Infragistics.Win.UltraWinGrid.SummarySettings = New Infragistics.Win.UltraWinGrid.SummarySettings("PercentChangeSummary", Infragistics.Win.UltraWinGrid.SummaryType.Formula, Nothing, "PercentChange", 2, True, "DataSource1", 0, Infragistics.Win.UltraWinGrid.SummaryPosition.UseSummaryPositionColumn, "PercentChange", 2, True)Dim SummarySettings3 As Infragistics.Win.UltraWinGrid.SummarySettings = New Infragistics.Win.UltraWinGrid.SummarySettings("ProjectedSummary", Infragistics.Win.UltraWinGrid.SummaryType.Sum, Nothing, "ProjectedSales", 3, True, "DataSource1", 0, Infragistics.Win.UltraWinGrid.SummaryPosition.UseSummaryPositionColumn, "Projected", 3, True) UltraGridColumn1.CellButtonAppearance = Appearance1UltraGridColumn1.Header.Caption = ""UltraGridColumn1.Style = Infragistics.Win.UltraWinGrid.ColumnStyle.ButtonUltraGridColumn1.Width = 20UltraGridColumn2.Width = 170UltraGridColumn3.AllowRowSummaries = Infragistics.Win.UltraWinGrid.AllowRowSummaries.[True]UltraGridColumn4.AllowRowSummaries = Infragistics.Win.UltraWinGrid.AllowRowSummaries.[True]UltraGridColumn4.Header.Caption = "% Change"UltraGridColumn5.AllowRowSummaries = Infragistics.Win.UltraWinGrid.AllowRowSummaries.[True]Appearance1.Image = Global.My.Resources.Resources.Lookup_EditAppearance1.ImageHAlign = Infragistics.Win.HAlign.CenterUltraGridBand1.Columns.AddRange(New Object() {UltraGridColumn1, UltraGridColumn2, UltraGridColumn3, UltraGridColumn4, UltraGridColumn5})UltraGridBand1.Override.AllowRowSummaries = Infragistics.Win.UltraWinGrid.AllowRowSummaries.[False]
SummarySettings1.DisplayFormat = "{0:$0}"SummarySettings1.GroupBySummaryValueAppearance = Appearance2SummarySettings1.SummaryDisplayArea = Infragistics.Win.UltraWinGrid.SummaryDisplayAreas.BottomSummarySettings2.DisplayFormat = "{0:0%}"SummarySettings2.GroupBySummaryValueAppearance = Appearance3SummarySettings2.SummaryDisplayArea = Infragistics.Win.UltraWinGrid.SummaryDisplayAreas.BottomSummarySettings3.DisplayFormat = "{0:$0}"SummarySettings3.GroupBySummaryValueAppearance = Appearance4SummarySettings3.SummaryDisplayArea = Infragistics.Win.UltraWinGrid.SummaryDisplayAreas.Bottom
UltraGridBand1.Summaries.AddRange(New Infragistics.Win.UltraWinGrid.SummarySettings() {SummarySettings1, SummarySettings2, SummarySettings3})UltraGridBand1.SummaryFooterCaption = "Total"UltraGrid1.DisplayLayout.BandsSerializer.Add(UltraGridBand1)UltraGrid1.DisplayLayout.Override.AllowRowSummaries = Infragistics.Win.UltraWinGrid.AllowRowSummaries.[False]
UltraGrid1.Location = New System.Drawing.Point(0, 0)UltraGrid1.Name = "UltraGrid1"UltraGrid1.Size = New System.Drawing.Size(942, 377)
Me.Controls.Add(UltraGrid1)
I would like to keep the column summaries and hide the sigma button. I have attached another screen shot showing what the ultragrid looks like at run time at the top and what I would like to appear at the bottom.
Thanks in advance
Larry
Hi Larry,
Your sample is explicitly setting AllowRowSummaries to true on 3 of the columns. The setting on the column will override the setting on the Band and the DisplayLayout. The more specific setting always takes precedence.
Thanks Mike for getting back to me.
So is there no way to have summaries down at the bottom for specific columns while hiding the sigma button?
Thanks again
You can still apply summaries to a column without setting the AllowRowSummaries property.
The purpose of the AllowRowSummaries is to show (or not show) the interface for the user to establish their own summaries. This is the "sigma" symbol you were seeing.
This didn't work for me. The zigma icon came up again on refreshing the grid. Is there I can do in the ultragrid designer part
What do you mean by "refreshing the grid?"
And what exactly is not working? This is a long thread with several different questions under discussion. So I don't know what you are asking.
If you are setting the DataSource or the grid or loading a layout, then the AllowRowSummaries property might be getting reset or changed. So it's generally a good idea to set it in the InitializeLayout event of the grid so that it will get set again if the DataSource is changed.