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_template_property/ below:

Website Navigation


JavaScript Grid column - template Config

template

Optional. A function which returns a template with content for a cell

Usage​
template?: (cellValue, row: IRow, column: ICol) => string;
Parameters​

The template function takes 3 parameters:

Example​
const grid = new dhx.Grid("grid_container", {
columns: [
{
id: "netChange", header: [{ text: "Net Change" }],
htmlEnable: true,
template: (cellValue, row, column) => {
return "<input type=\"checkbox\" " + (cellValue /> 300000 ? "checked": "") + ">";
}
},
// more columns configuration objects
],
// more options
});

Related article: Adding template to cells

Related sample: Grid. Cell templates


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