Skip to content
  • Services

    IT SERVICES

    solutions for almost every porblems

    Ecommerce Development

    Enterprise Solutions

    Web Development

    Mobile App Development

    Digital Marketing Services

    Quick Links

    To Our Popular Services
    Extensions
    Upgrade
  • Hire Developers

    Hire Developers

    OUR ExEPRTISE, YOUR CONTROL

    Hire Mangeto Developers

    Hire Python Developers

    Hire Java Developers

    Hire Shopify Developers

    Hire Node Developers

    Hire Android Developers

    Hire Shopware Developers

    Hire iOS App Developers

    Hire WordPress Developers

    Hire A full Stack Developer

    Choose a truly all-round developer who is expert in all the stack you require.

  • Products
  • Case Studies
  • About
  • Contact Us
Azguards Website Logo 1 1x png
Customizing Magento 2 Admin Grid Using UI Components and Data Providers
Updated on 03/07/2024

Customizing Magento 2 Admin Grid Using UI Components and Data Providers

ecommerce Magento Technical

In this series of tutorials, we will be discussing how to customize Magento 2 admin grids using UI components. We will cover some conventional and non-conventional techniques to achieve these customizations.

In this first tutorial, we will focus on using a custom data provider to pass custom data to the admin grid. Let’s get started.

Full Video Walkthrough by CodeWithAli

Setting Up the Environment

Official Magento UI Component Documentation

Before diving into the customization, it’s crucial to refer to the official UI component documentation of Magento. This resource is invaluable when customizing UI components.

Magento 2.4.7 Setup

For this tutorial author has used standard Magento 2.4.7 copy set up using the Mark Shust’s Magento Docker repository, which will be used throughout the series.

Creating the Basic Module

Our first task is to create a basic module named Demo_AdminGrids that we will use throughout the series.

Module Initialization

Registration File

Create registration.php file in the root folder. This file is the starting point of our module

Click here to view and edit & add your code between the textarea tags

Module Configuration File

Create an etc. folder inside the root and create a new module.xml inside this folder, this file defines the module and its dependencies. 

Click here to view and edit & add your code between the textarea tags

Running Setup Upgrade

Run the following command to initialize and install the module.

Click here to view and edit & add your code between the textarea tags

Configuring the Module

Adding Menu and ACL

Menu Configuration

To create a menu item in the admin pane, create the menu.xml fine inside etc/adminhtml

Click here to view and edit & add your code between the textarea tags

ACL Configuration

Create acl.xml file inside “etc/acl.xml which will be used to define access control for the module.

Click here to view and edit & add your code between the textarea tags

Creating Backend Controller

Routes Configuration

Create the routes.xml file in “etc/adminhtml”. This defines the URL path for the module

Click here to view and edit & add your code between the textarea tags

Controller File

Create a controller file inside “Controller\Adminhtml\Custom” name the file as CustomDataProvider.php. This defines the action for the route

Click here to view and edit & add your code between the textarea tags

Creating UI Component

Layout Configuration

Layout File

The layout file defines the structure of the page. Create a grids_custom_customdataprovider.xml file inside “view\adminhtml\layout”

Click here to view and edit & add your code between the textarea tags

UI Component Configuration

The ui_component file configures the UI component, create a grids_custom_customdataprovider_list.xml  inside view\adminhtml\ui_component

Click here to view and edit & add your code between the textarea tags

Custom Data Provider

Hire a dedicated developer for cross-platform API integration

Data Provider Class

The custom data provider class fetches and processes the data .Create custom.php inside “Ui\Component\DataProvider”

Click here to view and edit & add your code between the textarea tags

In this tutorial, we created a basic Magento 2 module and configured it to use a custom data provider for an admin grid. We covered the essential files and configurations needed to get a custom admin grid up and running. Stay tuned for the next tutorial where we will dive deeper into customizing the filters and data processing in the grid.

Would you like to integrate Whatsapp or APIs into your website or mobile app?

Feel Free To Contact Our Experts

Would you like to share this article?

Share

All Categories

AI Engineering
AI Infrastructure
AI/ML
Artificial Intelligence
Backend Engineering
ChatGPT
Communication
Context API
Database Optimization
Distributed Systems
ecommerce
Frontend Architecture
Frontend Development
GPU Performance Engineering
Infrastructure & DevOps
KafkaPerformance
LangGraph Development
LLM
LLM Architecture
LLM Optimization
LowLatency
Magento
Magento Performance
n8n
News and Updates
Next.js
Performance Engineering
Performance Optimization
Python
React.js
Redis & Caching Strategies
Redis Optimization
Scalability Engineering
Technical
UX and Navigation
WhatsApp API
Workflow Automation

Latest Post

  • The Bloated Context: Mitigating Worker OOMs in Resumable N8N Pipelines
  • The Lock Wait Cliff: Decoupling Atomic Inventory States from wp_postmeta in WooCommerce
  • The Swapping Cliff: Mitigating Latency Spikes in vLLM High-Concurrency Workloads
  • The Rebalance Spiral: Debugging Cooperative Sticky Assigner Livelocks in Kafka Consumer Groups
  • The Propagation Penalty: Bypassing React Context Re-renders via useSyncExternalStore

Related Post

  • Mitigating Crawl Budget Bleed: Detecting Faceted Navigation Traps via Python Generators
  • Magento 2 Varnish Tag Explosion: Prevent 503 Errors on Large Catalog Stores
  • Magento 2 Rich Text Schema Setup in JSON-LD: Step-by-Step Guide
  • Fixing Magento 2 Product Schema Markup | Missing “image” field FIX
  • How to Dispatch Custom Events in Magento 2

310 Kuber Avenue, Near Gurudwara Cross Road, Jamnagar – 361008

Plot No 36, Galaxy Park – II, Morkanda Road,
Jamnagar – 361001

Quick Links

  • About
  • Career
  • Case Studies
  • Blog
  • Contact Us
  • Privacy Policy
Icon-facebook Linkedin Google Clutch Logo White

Our Expertise

  • eCommerce Development
  • Web Development Service
  • Enterprise Solutions
  • Mobile App Development
  • Digital Marketing Services

Hire Dedicated Developers

  • Hire Full Stack Developers
  • Hire Certified Magento Developers
  • Hire Top Java Developers
  • Hire Node.JS Developers
  • Hire Angular Developers
  • Hire Android Developers
  • Hire iOS Developers
  • Hire Shopify Developers
  • Hire WordPress Developer
  • Hire Shopware Developers

Copyright @Azguards Technolabs 2026 all Rights Reserved.