waldo2188 / DatatableBundle

Symfony2 Ajax Datatable Bundle to simplify the use of http://datatables.net/ (and Doctrine entity inside)
MIT License
17 stars 16 forks source link

More information about how to add actions on each row #11

Closed wysow closed 7 years ago

wysow commented 7 years ago

Hello @waldo2188 can you give more information about how to add some actions in a ceil for each row?

Using the solution in the README is not really working for me, maybe I'm missing something...

Using version 4.0.2 with dataTable version 1.10.12 from their CDN.

wysow commented 7 years ago

Hum... just made it like this:

$this->get('datatable')
    ->setEntity('IxoilPurchaserBundle:OrderContext', 'oc')
    ->setFields([
        ...
        $this->get('translator')->trans('grid.column.actions', [], 'grids') => 'oc.id',
        '_identifier_' => 'oc.id',
    ])

Does it sounds right for you?

waldo2188 commented 7 years ago

Hy! Your code looks good. I've made this (https://github.com/waldo2188/datatable-sandbox) for playing with the datatable. Maybe it will help you.

wysow commented 7 years ago

Thanks, seems working as expected, closing this so...