Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8408631
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T23:41:11+00:00 2026-06-09T23:41:11+00:00

I created grid in magento backend, but pagination doesn’t work. No matter how many

  • 0

I created grid in magento backend, but pagination doesn’t work. No matter how many records per page I choose there are always all of them visible on the page. Now I have 41 records in database and ‘stats’ above the grid are ok (number of pages and records found):

Page 1 of 3 pages | View 20 per page | Total 41 records found

Which file is responsible of pagination?
There’s also another problem with order by certain column. For ex. records are displayed the same way either I choose ASC or DESC order by ID…

Grid:

public function __construct() {
        parent::__construct();

        $this->setId('logger_grid');
        $this->setUseAjax(FALSE);
        $this->setDefaultSort('id');
        $this->setDefaultDir(Varien_Data_Collection::SORT_ORDER_ASC);
        $this->setSaveParametersInSession(TRUE);
    }

    public function _prepareCollection() {
        $collection = Mage::getModel('logger/logger')->getCollection()->load();
        $this->setCollection($collection);
        return parent::_prepareCollection();
    }

    public function _prepareColumns() {
        $this->addColumn('id', array(
            'header' => Mage::helper('logger')->__('ID'),
            'sortable' => TRUE,
            'index' => 'log_id',
            'editable' => FALSE,
        ));

        $this->addColumn('interface', array(
            'header' => Mage::helper('logger')->__('Interface'),
            'sortable' => TRUE,
            'index' => 'interface',
            'editable' => FALSE,
        ));

        $this->addColumn('type', array(
            'header' => Mage::helper('logger')->__('Type'),
            'sortable' => TRUE,
            'index' => 'type',
            'editable' => FALSE,
        ));

        $this->addColumn('description', array(
            'header' => Mage::helper('logger')->__('Description'),
            'sortable' => TRUE,
            'index' => 'description',
            'editable' => FALSE,
        ));

        $this->addColumn('message_data', array(
            'header' => Mage::helper('logger')->__('Message'),
            'sortable' => TRUE,
            'index' => 'message_data',
            'editable' => FALSE,
        ));

        $this->addColumn('time', array(
            'header' => Mage::helper('logger')->__('Time'),
            'sortable' => TRUE,
            'index' => 'time',
            'editable' => FALSE,
            'type' => 'datetime',
        ));

        return parent::_prepareColumns();
    }

    public function getRowUrl($row) {
        return $this->getUrl('*/*/edit', array('id' => $row->getId()));
    }

Collection.php:

public function _construct(){
    $this->_init("logger/logger");
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T23:41:13+00:00Added an answer on June 9, 2026 at 11:41 pm

    Ok, problem solved. As always just one little thing…In _prepareCollection() function I used
    $collection = Mage::getModel('logger/logger')->getCollection()->load(); and pagination didn’t work because of load() function.

    Thanks for replying, sparcksoft 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I created a grid array in OGRE3D game engine but the array is generic
I created a grid in procedural code on my WPF page. Now I want
I have created a grid in Magento and there is a column which is
Ive created a grid accordion, with an image and text in each block, but
I created a grid of buttons. The following code creates the buttons and displays
i created one grid view application, it's working fine now showing all images in
I have created a grid in a doGet() function. This grid contains a dynamic
In Flash, I created a grid of 400 buttons with instance names c0 through
I created kendo ui grid.I am able to load the data from the database.For
I have a Windows 8 Metro application created from the Grid Application template. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.