A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.dhtmlx.com/suite/grid/api/gridcolumn_properties/gridcolumn_summary_property/ below:

Website Navigation


JavaScript Grid column - summary Config

summary

Optional. Creates the list of calculated values based on the column's data

Usage​
summary?: { 
[key: string]: string | [string, string] | (row: IRow[]) => string | number
} | string;
Parameters​

The defined list of calculated values is available only at the column's level. Can be initialized either as an object or as a string. As an object it contains calculated values set as key:value pairs, where the keys are the field names and values can be:

info

Note that when the column summary property is initialized as a string, the resulting value (excluding "count") is used with applied patternMask/numberMask, if there are any.

Example​
const grid = new dhx.Grid("grid_container", {
columns: [
{
id: "quantity",
type: "number",
header: [{ text: "Quantity" }],
footer: [{ text: ({ sum }) => sum }],
summary: "sum",
numberMask: { prefix: "$" },
},
// more columns configuration objects
],
// more options
});

Related article: Custom statistics in the column header/footer and spans


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4