GridView.GetRowSummaryItem(Int32, GridColumn) Method
Returns a key-and-value pair representing the summary item and its value calculated for a particular group footer cell.
Namespace: DevExpress.XtraGrid.Views.Grid
Assembly: DevExpress.XtraGrid.v24.2.dll
NuGet Packages: DevExpress.Win.Grid, DevExpress.Win.Navigation
#Declaration
public virtual DictionaryEntry GetRowSummaryItem(
int rowHandle,
GridColumn column
)
#Parameters
Name | Type | Description |
---|---|---|
row |
Int32 | An integer value specifying a group row handle. This identifies the group whose footer contains the desired cell. |
column | Grid |
A Grid |
#Returns
Type | Description |
---|---|
Dictionary |
A Dictionary |
#Remarks
The returned dictionary entry is an element of the hashtable returned by the GridView.GetGroupSummaryValues method. The entry’s key is a GridGroupSummaryItem object representing the summary item. The value is an object holding the calculated summary value.
To obtain the summary text displayed within a particular row footer cell, use the GridView.GetRowFooterCellText method.
Please refer to the Working with Summaries in Code. Custom Summaries topic for additional information.
Note
Detail pattern Views do not contain data and they are never displayed within Xtra
- Grid
Control. - returns the top most View in a grid;Main View - Grid
Control. - returns the focused View;Focused View - Grid
Control. - returns the currently maximized View;Default View - the sender parameter of View specific events;
- Grid
View. - returns a detail clone View for a specific master row.Get Detail View
#Example
The following code demonstrates how to use the GridView.GetRowSummaryItem
method to obtain a summary displayed in a specific cell of the group footer corresponding to the focused group row.
using DevExpress.XtraGrid.Views.Base;
private void gridView1_FocusedRowChanged(object sender, FocusedRowChangedEventArgs e) {
GridView currentView = sender as GridView;
// Obtain the summary item displayed in the focused column
// within the focused group row's footer
DictionaryEntry ent = currentView.GetRowSummaryItem(e.FocusedRowHandle,
currentView.FocusedColumn);
// Determine whether the summary item for the specified row and
// column is successfully obtained
if(ent.Key != null) {
GridGroupSummaryItem si = (GridGroupSummaryItem)ent.Key;
// Obtain the summary item's text
this.Text = si.GetDisplayText(ent.Value, true);
} else {
this.Text = "There is no summary for this row and column";
}
}
#Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the GetRowSummaryItem(Int32, GridColumn) method.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.