added support for data as array in datagrid