moved script tag outside the datagrid