Articles in this series

  • Understanding the Grid Serializer Block

Author - Paryank Kansara

I have extensive experience in web development of community based and enterprise level applications. My expertise includes sectors like: e-Commerce, Social Networking Portals, Content Management Systems, etc.

More Info » Follow me on Twitter »

Reader Comments (18)

  1. Mitesh
    April 17, 2012 at 8:32 pm /

    I try to set somethig like :

    protected function _prepareCollection()
    $tm_id = $this->getRequest()->getParam(‘id’);
    if(!isset($tm_id)) {
    $tm_id = 0;
    $pData = Mage::getResourceModel(‘checkprices/changedprice_changedprice’)->getPriceChanges($tm_id);
    return parent::_prepareCollection();
    In grid.php , getPriceChanges this method retrive me data , but i am getting
    ” Fatal error: Call to a member function setPageSize() on a non-object in” error. Can you please help me.

  2. Jignesh Thummar
    Jignesh Thummar
    April 26, 2012 at 5:08 am /

    i still remember u taught that to me. 🙂

  3. Magento grid serializer block saveAction and “Edit” links on child rows | ew

    […] == "undefined"){ addthis_share = [];}After reading this helpful article about Understanding the Grid Serializer Block I found that after the user clicked the “reset filter” button on the grid to reveal […]

  4. Harsh
    July 2, 2012 at 11:45 pm /

    Hello Paryankbhai,

    Great Post!!!

    I have created one Grid using serialize it is working fine but i have to add select all and unselect all options on that grid , i have tried it,

    i have also want to keep selected data as selected when i go to any page and come back.

    can you please help me ?


  5. Fellner Arthur
    Fellner Arthur
    September 12, 2012 at 3:15 am /

    I added to this grid, a new column that is a dropdown , with the option to modify it for each product listed in the grid. But I can’t manage this dropdown’s selected value to send it to post to other pages, so when i return to initial page, the selected value is gone.
    Any suggestions on how to change the post array that it’s sent?
    Many thanks in advance

  6. Magento affiliate
    November 14, 2012 at 5:04 pm /

    Thank you for this tutorial. I must take time to read and follow your guide, it’s very detailed.

  7. Adriano
    January 18, 2013 at 4:42 am /

    You can edit the template for the grid block in the xml update from you module, so you don’t have to put an editable or visible “position” column. Instead you add a hidden field with the name you like (the same you set in the addColumnInputName method). You have to put this hidden input after the checkbox, like at the en of the TR tag.

    Greetings and thanks for the serializer explanation.

  8. Ryan
    May 25, 2013 at 7:06 am /

    Thank you, this was extremely helpful for a recent project. I’m surprised this functionality is almost completely unknown and undocumented other than your article.

  9. Bill
    May 29, 2013 at 7:31 pm /

    Hi, I followed this article to build my own extension, but I still have problem in data preservation, when I check or uncheck the checkbox in each row, the hidden field value is not changed.

    1. Mohammad Faisal
      July 9, 2014 at 12:05 am /

      Ask experts you have pasted a wrong url in your comment

      Can you please update it?

  10. Ask Experts » Magento Custom Module Grid Serializer

    […] out-the-grid-serializer-block/ […]

  11. Punit Advani
    Punit Advani
    May 14, 2014 at 7:38 pm /

    Hello Sir,

    I have added the product grid in my custom admin module tab. The Grid is displaying but searching , sorting , pagination is not working. Can you please explain the same ?

    Waiting for your prompt response.


  12. Mohammad Faisal
    July 9, 2014 at 12:03 am /

    I’m working on a custom module where i need to show products selected by admin. The post is not just enough to fulfil what I’m looking for. Can you please help me?

  13. adhi
    July 16, 2014 at 7:32 pm /

    while doing grid serializer i had error like this
    Fatal error: Call to a member function setProductsRelated() on a non-object in /home/adhi/workspace/magento_sample/app/code/local/Sfa/Template/controllers/Catalog/ProductController.php on line 109
    what needs to be done

  14. Product grid serializer on a backend edit customer tab - Technology

    […] The product grid, or more specifically the grid serializer, is added like this: […]

  15. ND
    March 17, 2015 at 12:08 am /

    In above u told that there is hidden field.In that hidden field how to store value from database. Means when i m edit a some data n in this grid i m not change anything so that time hidden field is empty so that my database changed but i dont want to do that so how to add my database value to hidden input


Add a Comment & Join the Discussion

Insert small snippets of code by using [code]{your_code_here}[/code]
For larger code blocks please use and paste your link.

You may also use the following HTML in your comment: <a href="" title=""> <abbr title="">
<acronym title=""> <blockquote cite=""> <cite> <em> <strike> <strong>


This site uses Akismet to reduce spam. Learn how your comment data is processed.