omines / datatables-bundle

DataTables bundle for Symfony
https://omines.github.io/datatables-bundle/
MIT License
262 stars 113 forks source link

Question: Use data from ORM with a detail row #52

Closed ISeeTWizard closed 5 years ago

ISeeTWizard commented 5 years ago

Hi is it possible to retrieve data from ORM (doctrine) to use it with a detail row like in the example here: use Omines\DataTablesBundle\Adapter\Doctrine\ORMAdapter: https://datatables.net/examples/api/row_details.html And if yes, how? I'm very new in developping so this maybe just a silly question, sorry already about that.

curry684 commented 5 years ago

Nope, neither a silly question nor supported out of the box. It's a pretty advanced usage of the datatables library that lives almost completely on the client side, and we're "not opinionated" on that - the bundle only provides serverside integrations for plain table rendering.

We actually have this setup in use in an internal application here, loading the child panels with Ajax on click, it's just a matter of doing the right XHR calls with a Twig template. Not terribly complex but really mostly a DataTables JS issue where this bundle plays no real role.

ISeeTWizard commented 5 years ago

OK Thanks for the information :) And for you it's not compley lol - I'm still learning. Than I gonna try to figure out how to do it.

By the way, is this a server side processing or not? Like with these options here: "processing": true, "serverSide": true, And if not, can these options be used as these seems to be just for ajax callings if I understand right