How to change sort direction in magento admin for categories product
-
12-12-2019 - |
题
In magento $this->setDefaultSort('position');
sorts the grid by 'position' column but in descending order. How can I change its sorting order to Ascending.
解决方案
I got it by searching in Magento files.
use $this->setDefaultDir('ASC');
to set direction.