js code to render grid for sql db analytics