formated main.js of datagrid