xxxxxxxxxx
w2utils.formatters['myFormatter'] = function (val, params) {
return 'format: ' + val;
}
xxxxxxxxxx
let grid = new w2grid({
name : 'grid',
columns: [
{ field: 'recid', text: 'ID', size: '50px' },
{ field: 'name', text: 'Name', size: '30%' },
{ field: 'email', text: 'Email', size: '40%', render: 'myformatter'},
{ field: 'sdate', text: 'Start Date', size: '120px', render:'date' },
{ field: 'sdate', text: 'End Date', size: '120px', render:'date|dd/mm/yyyy' }
],
});