Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in case of using setMultiple for multirow actions like delete #154

Open
rene9 opened this issue Nov 30, 2015 · 1 comment
Open

Bug in case of using setMultiple for multirow actions like delete #154

rene9 opened this issue Nov 30, 2015 · 1 comment

Comments

@rene9
Copy link

rene9 commented Nov 30, 2015

I want to use the form on the top to apply something like delete for multiple rows.
Using the setMultiple-Methode I’m having the bug that the order is always applied to the next column.
Without setMultiple it works fine.
Here is the code:
private function _datatable()
{
$datatable = $this->get('datatable');
$datatable->setEntityManager($this->getDoctrine()->getManager()) // Optional
->setEntity("EasylearnCoreBundle:EduStructItem", "e") // Replace "XXXMyBundle:Entity" by your entity
->setFields(
array(
"Id" => 'e.id', // Declaration for fields:
"Titel" => 'e.title', // "label" => "alias.field_attribute_for_dql"
"identifier" => 'e.id') // you have to put the identifier field without label. Do not replace the "identifier"
)
->addJoin('e.lang', 'l', \Doctrine\ORM\Query\Expr\Join::INNER_JOIN)
->setOrder("e.title", "asc") // it's also possible to set the default order
->setHasAction(false)
->setSearch(TRUE)
->setSearchFields(array(0,1))
->setMultiple(
array(
'delete' => array(
'title' => 'Delete',
'route' => 'ali_mdelete' // path to multiple delete route
)
)
); // you can disable action column from here by setting "false".
return $datatable;
}

Please let me know when you fixed the bug.

@phpetra
Copy link

phpetra commented Dec 5, 2015

I can confirm. Have the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants