Closed sanraj closed 12 years ago
you mean your result per page value ?
yes yes
Which browser do you use ?
crome
Do you have the same behavior when you order your grid and then click on next page button (order is getting reset) ?
Can you paste your controller code for the grid?
$source = new \APY\DataGridBundle\Grid\Source\Entity($sourceEntity);
$grid = $controller->get('grid');
$tableAlias = $source::TABLE_ALIAS; $source->manipulateQuery(function ($query) use ($tableAlias, <$someparameter>) { $query->andWhere($tableAlias . '.field in (:options)'); $query->setParameter('options', <$someparameter>); });
$grid->setSource($source);
$rowEditAction = new \APY\DataGridBundle\Grid\Action\RowAction('Edit', '
And the rest ? Do you call $grid->isReadyForRedirect() ?
(There is a in() method on the query object)
no
Do you call $grid->getGridResponse() or $gridManager->getGridManagerResponse() ?
no we hv'nt called
If you don't call one of these methods, the grid is not computed and nothing work.
Follow the entire getting started toturial.
actually our grid working fine. Only its issue is of changing page limit.
If you call $grid->getGridResponse(), does it work ?
we are using like this,
return $grid->getGridResponse('KRABundle::grid.html.twig');
not working, error occoured Fatal error: Call to undefined method Symfony\Component\HttpFoundation\Response::getHash() in /var/www/Symfony/vendor/bundles/APY/DataGridBundle/Twig/DataGridExtension.php on line 99
It seems that you don't have the last version of the bundle.
Hi,
We did download master copy
and modified our code as
$source = new \APY\DataGridBundle\Grid\Source\Entity($sourceEntity);
$grid = $this->get('grid');
$tableAlias = $source::TABLE_ALIAS; $source->manipulateQuery(function ($query) use ($tableAlias, <$someparameter>) { $query->andWhere($tableAlias . '.field in (:options)'); $query->setParameter('options', <$arrayparameter>); });
$grid->setSource($source);
$grid->setRouteParameter('menu', $this->getRequest()->get('menu')); $grid->setRouteParameter('submenu' , $this->getRequest()->get('submenu'));
$rowEditAction = new \APY\DataGridBundle\Grid\Action\RowAction('Edit', '
return $grid->getGridResponse('KRABundle::grid.html.twig');
when I comment $grid->setRouteParameter() calls, grid pagination works fine but when the calls are uncommented grid pagination does not work...
any specific note regarding the solution of the problem would be appreciated.
With this call you change the url of the grid, so the no-persistence feature can't work (referer = current url). In your case you have to enable persistence. $grid->setPersistence(true);
We added a $grid->setPersistence(true) call but no luck so far...
but one noticeable thing is in url we found 'menu=21&submenu=23&grid_9843d3f9c4588a51e30f08ff9affde79[_limit]=100' which I am guessing is wrong ...
Try again with the last commit.
appreciate your help... issue seems to be resolved ... :)
Hi, when i change page from drop down (for eg. 20) & then i click on next page button my drop down is getting reset. I know this is bydefaut change but if i want to keep constant what i do?
Thanks