0

Let's say I need an admin grid where not all columns of the sales_order table will be, but only some of them. For example:

  1. customer_id
  2. customer_name
  3. nickname

How best to solve such a problem?

1 Answer 1

0

If you want to make Grid for just Practice:

You should follow these steps:

https://www.mageplaza.com/magento-2-module-development/create-admin-grid-magento-2.html#step-5-method-1---create-admin-grid-using-component

OR You can Override the sales grid and customize it.

5
  • Do I understand correctly that we establish a connection with the table in di.xml, and then we get the data in the layout file by specifying the fields of the same name?
    – esca7a
    Aug 23, 2022 at 13:07
  • Yes. You can try this.
    – Rana Zain
    Aug 24, 2022 at 7:40
  • If this helps you a little bit, Then you can mark this an answer
    – Rana Zain
    Aug 24, 2022 at 10:10
  • dear friend, could you write step by step instructions in short form for this? I would be very happy for help! :)
    – esca7a
    Aug 24, 2022 at 19:19
  • You will follow these : Create new module Use Core Database Table Override the Grid Add Columns you want and then save it in the db
    – Rana Zain
    Aug 25, 2022 at 7:36

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.