fixed datagrid usage bugs