GridMenuItemClickEventArgs.SummaryFormat Property

Gets or sets the summary value formatting.

Namespace: DevExpress.XtraGrid.Views.Grid

Assembly: DevExpress.XtraGrid.v20.1.dll

Declaration

public string SummaryFormat { get; set; }
Public Property SummaryFormat As String

Property Value

Type Description
String

A string value representing the summary value formatting. An empty string if the menu was invoked within a column header or group panel.

Remarks

This property is in effect only when the GridMenuItemClickEventArgs.MenuType property value is GridMenuType.Summary. It enables you to specify a custom summary value format when end-users change the summary type using the context menu.

Suppose the View contains a column displaying currency values. Thus, you may want to provide currency formatting for summary values. To do so, you can use the corresponding summary item's GridSummaryItem.DisplayFormat property. In this case, the summary value will be displayed using the specified formatting at the application startup. If the end-user changes the summary type using a context menu, the default summary format for the current summary type will be applied. Thus, currency formatting will be lost. To handle such cases, you need to read the GridMenuItemClickEventArgs.SummaryType property value to identify the applied summary type and assign a corresponding format string to the SummaryFormat property.

The SummaryFormat property corresponds to a summary item's GridSummaryItem.DisplayFormat property. Please refer to the latter property's description for details on specifying summary format strings.

See Also