0

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.

Example :

1 Answer 1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.