0

I have created a custom report with custom collection. The issue is that I am getting an extra row in report grid. Please check screen shot to get a better idea.
enter image description here

Check my code below for one of the columns. Is there any property missing that would hide that row?

Grid.php

$this->addColumn('customer_lastname', array(
    'header' => Mage::helper('sales')->__('Last Name'),
    'index' => 'customer_lastname',
    'sortable'      => false,
    'filter' => false,
));

I also want to remove "Reset Filter" and "Search" button. So please help me for that also .

1

In you grid block, in the constructor or _prepareLayout method, add this line.

$this->setFilterVisibility(false);

If you are adding it in the constructor, add it after parent::__construct.

| improve this answer | |
  • If you check screenshot you will find that no. of "Total Records found" is 1. Instead 3. Do you know where I am wrong ? Actually I am joining 2 tables. One of them have multiple entry of single order so I have to consider that only once. – Krupali Sep 13 '16 at 10:03
  • @Krupali. This is a totally different issue. You should ask an other question and post as much code as possible from your module. – Marius Sep 13 '16 at 10:41
0

It's not an exactly row, that is the place where you could find the filter in order to filter out the rows as per your wish.

$this->addColumn('customer_lastname', array(
'header' => Mage::helper('sales')->__('Last Name'),
'index' => 'customer_lastname',
'sortable'      => false,
'filter' => true,
));

In the filter, if you use 'true', you will find the filter.

For removing reset filter use , $this->setFilterVisibility(false);

| improve this answer | |

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.