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
    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);
    $this->setCollection($pData);
    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.

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

    i still remember u taught that to me. 🙂

    Reply
  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
    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 ?

    Thanks,Harsh

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

    Hi
    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

    Reply
  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.

    Reply
  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.

    Reply
  8. Ryan
    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.

    Reply
  9. Bill
    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.

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

      Ask experts you have pasted a wrong url in your comment http://magebase.com/magento-tutorials/understanding-the-grid-serializer-block/comment-page-1/#comment-5094

      Can you please update it?

      Reply
  10. 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.

    Thanks

    Reply
  11. 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?

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

    hello,
    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

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

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

  14. ND
    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

    Reply

Add a Comment & Join the Discussion

Insert small snippets of code by using [code]{your_code_here}[/code]
For larger code blocks please use http://pastebin.com 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>