I am trying to programmatically update the gridOptions.sortInfo on the Angular grid ng-grid, but I can't get it working.
I have both "name" and "age" columns. I am initially setting the sort on the "name" column but would like load some new data and then update it to sort on "age". (Programmatically, not just by clicking the column header).
I can set the $scope.gridOptions.sortInfo to a new value, but the grid does not reflect this. What is the correct way to update the gridOptions.sortInfo ?
Please see plunker:
http://plnkr.co/edit/JBYnrwLAIwFSKS6uSAND?p=preview
EDIT: Please note I would like to be able to update the sort direction i.e. ascending/descending as well as the actual column to sort on.
Many thanks