Column align

Example
column-align.js
column-align.html
users.js
$('#columns-align').guiGrid({
	
	
	columns: [{
        header: 'Name',
        field: 'name',
        align: 'right'
    }, {
        header: 'Position',
        field: 'position',
        align: 'left'
    }, {
        header: 'Team',
        field: 'teamShort',
        width: 80,
        align: 'right'
    }, {
        header: 'Training',
        field: 'training',
        type: 'number',
        width: 100,
        align: 'center'
    }, {
        header: 'Company',
        field: 'company',
        align: 'center'
    }],

	source: [...users]

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

Column align - options

OptionsTypeDefaultDescription
alignstring'' Default value depends on the column type. e.g 'boolean' has align center, 'number' right.
Possible values:
  • 'right',
  • 'center',
  • 'left'.

Related articles:

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