DataGrid does not work right with pagination