Hello Magento Friends,

In today’s instructional guide I will be describing How to Add Storeview Switcher in Custom Admin Grid using UI Component in Magento 2.

Magento 2 provides the functionality to set up multiple stores. Multi-store is used when the admin wants to manage multiple stores and websites from a single admin panel. When an admin thinks of expanding the business, multi-store websites come into the picture.

To manage multiple stores, the admin needs a multi-store view in the admin UI grid in Magento 2.

Let’s see How you can Add Storeview Switcher in Custom Admin Grid using UI Component in Magento 2.

Steps to Add Storeview Switcher in Custom Admin Grid using UI Component in Magento 2:

Step 1: First of all go to the below file path

app\code\Vendor\Extension\view\adminhtml\layout\vendor_extension_grid.xml

Make changes in the code mentioned as follows

Step 2: Then move to the following file path

app\code\Vendor\Extension\view\adminhtml\ui_component\vendor_extension_listing.xml

Then apply changes in the file as given below

Step 3: After that navigate to the below-mentioned file path

app\code\Vendor\Extension\Ui\Component\Bookmark.php

Then modify the file with the below code snippet

Step 4: Finally run the below commands

Conclusion:

Using the above steps admin can easily Add Storeview Switcher in Custom Admin Grid using UI Component in Magento 2. Before that, you need to Set up Multi-Store in Magento 2

For any issues, you can connect with me through the comment section.

Happy Coding!

Click to rate this post!
[Total: 2 Average: 5]