I was wondering if someone can help be to point me to an example for a "Best Practice" example for a sortable, searchable datagrid in Symfony2 with the doctrine ORM.

I always see Tutorials with the implementation of some data, generating Entity and so forth, but some/all lack the code how to enable Pagination, how can the user search in multiple fields from the frontend and how to handle the ordering after a field the user chooses to.

Before some folks now think I'm stupid, of course i can make a GET Variable and just make an IF clause to ask for it but i would really appreciate a best Practice example so i know how i am supposed to handle it.

Right now I'm thinking about an open source project for a Organisation system, so i will have many Tables i have to join and many datagrids to display. I would really love to get it in a right way so i don't have to write it all over again when the community is laughing at my code...

Thank you for reading and your help.