I am implementing http://ui-grid.info/ in my application.
There is a feature of Column Moving, where Columns can be moved.
http://ui-grid.info/docs/#/tutorial/217_column_moving
This is how i add columns :-
$scope.gridOptions.columnDefs.push({ field: 'Name', displayName: 'EMPLOYEE NAME'});
$scope.gridOptions.columnDefs.push({ field: 'Age', displayName: 'AGE'});
....
Here is the event which fires when column is moved.
http://ui-grid.info/docs/#/api/ui.grid.moveColumns.api:PublicApi
My problem is that i want to get the new order of the columns in $scope.gridOptions.columnDefs for saving it in db.
On Column Moving $scope.gridOptions.columnDefs doesn't get updated.
How to solve this?