Refactor datagrid stuff

| Q                    | A
| -------------------- | ---
| Bug fix?             | N
| New feature?         | N
| BC breaks?           | Y
| CI currently passes? | Y
| Tests pass?          | Y (locally atm)
| Scenarios pass?      | Y
| Checkstyle issues?   | N
| Changelog updated?   | N
| Fixed tickets        | -
| Doc PR               | -
done