Column formatter

Example
column-formatter.js
column-formatter.html
users.ts
$('#columns-formatter').guiGrid({
	
	
	columns: [{
        header: 'Name',
        field: 'name',
    }, {
        header: 'Position',
        field: 'position',
    }, {
        header: 'Team',
        field: 'teamShort',
        width: 80,
    }, {
        header: 'Training',
        field: 'training',
        type: 'number',
        width: 100,
        formatter: (v) => v.toFixed(2)
    }, {
        header: 'Company',
        field: 'company',
    }],

	source: [...users]

});
<div id='column-formatter'></div>
[
    {
        "name": "Mark Ross",
        "company": "Genco Pura Olive Oil Company",
        "position": "Team Leader",
        "teamSort": "TI",
        "training": 13,
        "budget": -7000
    }, ...
]

Column formatter - options

OptionsTypeDefaultDescription
formatter(value: any, data: any) => any(v) => v Value formatter.

Related articles:

We use cookies to improve your experience. If you continue browsing, we assume that you consent to our use of cookies.