In the USA, tax rates vary widely among most states and some localities. In order to add tax rates for different cities, some of our clients had a pressing need to add a city column to the ‘Tax Manager’ admin grid. To solve this, we were working on developing an extension in Magento 2. But adding the column was not a straight-forward affair. We faced some challenges in overriding the admin grid in Magento 2. We resolved this and as usual, wanted to share our solution so that the community benefits as well.

Step by step procedure : Magento 2 – How to Add a New Column in Admin Grid?

Step 1:

Module Registration

Create a custom module based on the Magento 2 structure in the folder app/code

File Path : Magento-CE-2.0.8/app/code/DCKAP/Tax/registration.php

Step 2:

Module Configuration

Create a module.xml file in the below path to define your Magento 2 extension

File Path: Magento-CE-2.0.8/app/code/DCKAP/Tax/etc/module.xml

Step 3:

Override Grid
Locate the core module admin grid xml file path. Create the same folder path under custom module.

File Path :  Magento-CE-2.0.8/app/code/DCKAP/Tax/view/adminhtml/layout/tax_rate_block.xml

Step 4:

Create custom field
Create a new field ‘City’ and define this under the reference block it needs to be shown.

After completing the above steps run the below command.

After running the above command, clear all the Magento cache and check if the extension has been successfully installed in Magento 2 admin.

Once the extension has been installed you will be able to view the custom field in admin as shown in the screen shot below.

add column magento 2


Hope the blog was useful. Let us know if you have any comments or queries. We will be happy to hear from you.

Here’s how to add a new column to admin grid in Magento 2. Learn some of the intricacies in Magento 2 from certified Magento developers who has developed numerous websites.


  • Thanga Durai

    Thangadurai is one of our senior software engineers and is Magento Developer Plus Certified. A sincere worker, he is part of one of the most successful and long-running projects in DCKAP. A fitness enthusiast, he tones his body when not fine tuning his code. Listening to music and playing Table Tennis are his other hobbies.


Ready to drive online revenue

Get In Touch

7 thoughts on “Magento 2 – How to Add a New Column in Admin Grid?

  1. Hi Thanga Durai,
    Thanks for the nice post. I have a question.

    I am using renderer in the custom column. Now I want to filter column values by the values rendered by the renderer class, but it is filtering column values based on the original values.

    Can you help me ?

  2. Hi Thanga,

    Really Nice post. Perfect!!
    Could you please let me know how can we add new column with custom data in the “Order Export CSV”?

  3. Thank you for this fantastic information,
    But you did not write how we can add the field to the form and also how to add the column to the Database,
    in this way we only display the field on the grid, could you please help me?

    1. Hi Vivek,
      Thanks for your query. We need some information from our end.
      Where do you want to add custom input field in Sales Order Admin…
      1. Sales Order Admin Grid
      2. Sales Order View (e.g. Comments)
      3. Order Creation through Admin
      Please let us know. It will help us to answer your query.
      Please subscribe to our blogs.

    1. Hi Ibrahim,

      Thanks for your patience…he is the answer…

      You need to override the UI component sales_order_grid.xml under [NAMESPACE]/[MODULE]/view/adminhtml/ui_component/sales_order_grid.xml

      Like Below:

      New Filed Name

      Then you need to create the UI class under [NAMESPACE]/[MODULE]/Ui/Component/Listing/Column/Datas.php and write data which is you want.

      Please let me know if you have any queries.
      Subscribe to our blogs for more such interesting articles.

Leave a Reply

Your email address will not be published. Required fields are marked *