1

I have added custom grid on admin side and all columns are displayed correctly. Filters are also working fine. But when I export to CSV, all records are exported and filters are ignored. Please suggest what to do?

4
  • If you inspect the options from the export dropdown, do you see the filters attached at the end of the string url? Nov 11, 2015 at 13:16
  • @SamuelComan: I only see below code: <select style="width:8em;" id="customerGrid_export" name="customerGrid_export"> <option value="test.com/index.php/admin/customer/exportCsv/key/…> <option value="test.com/index.php/admin/customer/exportXml/key/… XML</option> </select>
    – F-Z
    Nov 12, 2015 at 13:34
  • Besides the "key" parameter at the end of the URL you should have the "filter" parameter as well. That one is taken from page URL. It depends on how you do the filtering. If it's done by Ajax then make sure the corect Export select is received in the Ajax response. If it's done by page reload, you should have the filter in the browser url as well. You can debug more in this class Mage_Adminhtml_Block_Widget_Grid Nov 12, 2015 at 15:07
  • @SamuelComan - Thanks for detailed explanation. I will further explore this and let you know.
    – F-Z
    Nov 24, 2015 at 12:07

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.