How to Make Column Sorting “False” Using UI Component in Magento 2

How to Make Column Sorting “False” Using UI Component in Magento 2

Grids in Magento 2 are a way to list the items in a database table for better management. Grids are used to represent, filter and sort various data in the Magento backend using UI component.

They are also used to perform mass actions such as updates and deletes. The Grid enables you to sort single and multiple data-bound columns.

As the default Magento 2 admin grid disables sorting on Thumbnail, Salable Quantity and Actions, you can also make column sorting false using UI component in Magento 2 in your custom grid or columns.

For instance, the columns that contain buttons, URL link or code does not need sorting. In that scenario, use the below method and disable the sorting for custom columns.

Method to Make Column Sorting False Using UI Component in Magento 2

  • Add tag <sortable> in your code
You just have set false in <sortable> tag and the sorting disables!

If you find any doubt regarding this post, do mention them in the Comment section below.

I would be happy to help.

Feel free to share the solution with Magento Community via social media.

Thank You.

Get Weekly Updates

Never miss Magento tips, tricks, tutorials, and news.

Thank you for subscribing.

Something went wrong.

(based on 1 Reviews)

An expert in his field, Jignesh is the team leader at Meetanshi. His passion for Magento has inspired others in the team too. Apart from work, he is a cricket lover.

Leave a reply:

Your email address will not be published.