Disable filter in a custom column in sales order grid in Magento

719 Views Asked by At

I am using layout handles in adding custom column to my Orders grid. How can i disable the filtering input field?

Here is my code: app/design/adminhtml/default/default/layout/company

<?xml version="1.0"?>
<layout>
<sales_order_grid_update_handle>
<reference name="sales_order.grid">
    <action method="addColumnAfter">
        <columnId>printed</columnId>
        <arguments>
            <header>Printed</header>
            <index>printed</index>
            <width>80</width>
            <renderer>Company_myModule_Block_Adminhtml_Sales_Order_Renderer_Printed</renderer>
            <type>text</type>
        </arguments>
        <after>status</after>
    </action>
</reference>
</sales_order_grid_update_handle>
<adminhtml_sales_order_grid>
<!-- apply layout handle defined above -->
<update handle="sales_order_grid_update_handle" />
</adminhtml_sales_order_grid>
<adminhtml_sales_order_index>
<!-- apply layout handle defined above -->
<update handle="sales_order_grid_update_handle" />
</adminhtml_sales_order_index>
</layout>

enter image description here

1

There are 1 best solutions below

1
laurent On

Add to your arguments the filter argument with false value:

<arguments>
            <header>Printed</header>
            <index>printed</index>
            <width>80</width>
            <renderer>Company_myModule_Block_Adminhtml_Sales_Order_Renderer_Printed</renderer>
            <type>text</type>
            <filter>false</filter>
</arguments>