1.5 (30.67%) 15 votes

Here are the steps that you will follow in this Create simple grid listing in Magento 2 admin with UI component:

  1. Step 1. Create company_staff_listing.xml
  2. Step 2. Create StaffDataProvider
  3. Step 3: create model

Create simple grid listing in Magento 2 .In my last post in this series, we have learnt “How to Register a module and Create Database in Magento 2”.
Now we will continue to create a grid listing page in admin for Magento 2.
This is the final result:

Below are some steps to get it done:

Step 1. Create company_staff_listing.xml 

in app/code/Magestore/Company/view/Adminhtml/ui_component

by using this component, all grid elements will be handle by XML file with many default build-in component of Magento such as: search, filter, export, button, mass action. So it’s easy for us to customize the grid without editing code.

Step 2. Create StaffDataProvider in:


app/code/Magestore/Company/UI/DataProvider
StaffDataProvider.php

Step 3. create model

app/code/Magestore/Company/Model/Staff.php

Finally, here is the result.
You can download source code of lesson here:
Create simple grid listing in Magento 2 admin with UI component

Create simple grid listing in Magento 2
Create simple grid listing in Magento 2

Your Magento website needs a powerful Magento ERP for stock control.

DON'T MISS THE CHANCE!

magento erp

How to Add a Custom Discount in Magento 2 (Magento 2.3)? - Magento 2 Custom Discount
How to Run Enable/Disable Maintenance Mode in Magento 2 - Magento 2.3

Leave a Reply

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