Howto get attributeorders of dataprovider

Hello
I have a list of data (DynaGrid) in my index view with possibility to sort data by column (no multiple sorting)
On each row I have a Modify button the goes to a new page showing all infomation of the row.
In this page I want to add Previous and First button allowing the user to navigate through the rows
I thought that I have achieved this, but I did not think about order of rows.
The navigation should be done according to the order of the rows in the index file : so I need to get infomation about the order of the dataprovider.
I had a look at the properties of the dataprovider but there is nothing that shows the name of the ordered attribute (and ASC ou DESC)
Is there any way to do that ?

Not sure what you are asking but we can get sorting order using getAttributeOrders() Sort, yii\data\Sort | API Documentation for Yii 2.0 | Yii PHP Framework

1 Like