Thanks N@gendra for the response. I am using Pega 7.1.7.
I am able to enable sorting on columns. But, I want one particular column to be sorted by default when the screen loads. Also, the sorting symbol which shows ascending/descending order should be visible on that column.
Basically, the above thing should happen without user intervention. Data should appear sorted to the user with sorting symbol visible on grid column.
The most efficient way is to have the Database Sort the Data for you before you even capture the Result Set in pxResults. If you are using Embedded SQL in the RDB-List simply add an "Order By" clause to your Embedded DML Select Statement.
I have a similar requirement to sort a particular column when the repeat grid is loaded. Its better to use the function @pxSortPageList(pagelist_name, column_name, ascending/descending) in the load data transform or in the pre activity of the screen.