             c["rerenderOnResize"] = true
             c["id"] = c["field"]
             c["width"] = 200
+            c["formatter"] = @formatter
             max = 0
             for d in resultset.rows
                 ## console.log 'hej->', c["field"], d[c["field"]].length, max

ControlsView = require './controls-view'
FileFinderUtil = require '../file-finder-util'
{$} = require 'space-pen'
window.jQuery = require 'jquery'

class ResultsPaneView extends DockPaneView


    reset: () ->
        @empty()

    formatter: (row, cell, value, columnDef, dataContext) ->
        if value == null
            return "<span style='color:#fcc81e;font-weight:bold;font-style:italic;'>NULL</span>";
        if columnDef.type == "boolean"
            if value == true
                return "<span style='color:#a2ff6d;font-weight:bold;'>true</span>";
            else
                return "<span style='color:#ff816d;font-weight:bold;'>false</span>";
        if columnDef.type in ['timestamp with time zone', 'timestamp without time zone']
            return new Date(value).toLocaleString(atom.config.get('pg-hoff.locale'))
        if columnDef.type in ['time with time zone', 'time without time zone']
            return new Date('2000-01-01 ' + value).toLocaleTimeString(atom.config.get('pg-hoff.locale'))
        if columnDef.type == 'json'
            return JSON.stringify(JSON.parse(value), null, '   ')
        return value

    render: (resultset) ->
        return unless resultset.complete and resultset.columns
        options =
