In admin, I want to show custom calculations next to pager in custom module's grid.
If there is any a way to do that, please share.
1 Answer 1
you will need to change the template of your grid.
By default the grid is rendered with the template app/design/adminhtml/default/default/template/widget/grid.phtml
You need to add this in your grid block __construct method after calling parent::__construct().
$this->setTemplate('your_folder/grid.phtml');
If the method __construct does not exist, create it and make it look like this:
public function __construct($attributes=array())
{
parent::__construct($attributes);
$this->setTemplate('your_folder/grid.phtml');
}
then copy the file app/design/adminhtml/default/default/template/widget/grid.phtml to app/design/adminhtml/default/default/template/your_folder/grid.phtml
Now you can do modifications in your new file.
You should insert the code that shows your custom values right after the pager
Explore related questions
See similar questions with these tags.