Back to Devexpress

GridOptionsMenu.ShowAddNewSummaryItem Property

windowsforms-devexpress-dot-xtragrid-dot-views-dot-grid-dot-gridoptionsmenu-f0e2759e.md

latest4.1 KB
Original Source

GridOptionsMenu.ShowAddNewSummaryItem Property

Gets or sets whether the footer menu displays an item that allows users to add multiple total summaries for a column.

Namespace : DevExpress.XtraGrid.Views.Grid

Assembly : DevExpress.XtraGrid.v25.2.dll

NuGet Packages : DevExpress.Win.Grid, DevExpress.Win.Navigation

Declaration

csharp
[DefaultValue(DefaultBoolean.Default)]
[XtraSerializableProperty]
public virtual DefaultBoolean ShowAddNewSummaryItem { get; set; }
vb
<DefaultValue(DefaultBoolean.Default)>
<XtraSerializableProperty>
Public Overridable Property ShowAddNewSummaryItem As DefaultBoolean

Property Value

TypeDefaultDescription
DefaultBooleanDefault

A DefaultBoolean value that specifies the availability of the corresponding menu item.

|

Available values:

NameDescriptionReturn Value
True

The value is true.

|

0

| | False |

The value is false.

|

1

| | Default |

The value is specified by a global option or a higher-level object.

|

2

|

Property Paths

You can access this nested property as listed below:

Object TypePath to ShowAddNewSummaryItem
GridView

.OptionsMenu .ShowAddNewSummaryItem

|

Remarks

The ShowAddNewSummaryItem property allows you to show or hide the “Add New Summary” submenu item in the footer menu. The item lets an end-user add multiple summaries at runtime:

By default, this property is set to DefaultBoolean.Default. This is equivalent to DefaultBoolean.True for GridView and BandedGridView Views, and to DefaultBoolean.False for AdvBandedGridView View.

To add multiple total summaries for a column in code, use the GridColumn.Summary property.

The “Add New Summary” submenu contains all available summaries, except those that have been applied to a column.

Example

The example demonstrates how to hide the “Add New Summary” item in the footer menu.

csharp
gridView1.OptionsMenu.ShowAddNewSummaryItem = DefaultBoolean.False;
vb
GridView1.OptionsMenu.ShowAddNewSummaryItem = DefaultBoolean.False

See Also

Summary

Footer Context Menu

Summaries

GridOptionsMenu Class

GridOptionsMenu Members

DevExpress.XtraGrid.Views.Grid Namespace