# column (event)

The column event is triggered during datagrid initialization and allows to configure the columns programmatically (in case you've received a static JSON as columns and want to assign some functions to convert, format or field properties.

function onColumn(column){
    if (typeof column.format == 'string'){
        let pattern = column.format;        // receive format pattern in JSON
        column.format = function(value){    // replace with actual formatting function
            return moment(value).format(pattern);