Update grid.js to accept formatter