Update Datagrid/Datagrid.php

Fix sorting by entity issue. See #1035
Merge pull request #1132 from sensi/master

Makes it possible to sort over entity fields in list view.