I have problem to enable disabled sorting in ui-grid in Angular 1. I try this in grid columnsDefs:
{
...
enableSorting: false
},
And I try to overwrite it when something is happening in my controller:
$scope.$watch("vm.verifiedCreatedRecords", function(newVal, oldVal){
if(newVal.length > 0){
vm.UpdateCreationGridOptions.columnDefs[4].enableSorting = true;
}
else {
vm.sortingCreate = false;
}
}, true);
vm.UpdateCreationGridOptions.columnDefs[4].enableSorting become true, but the grid is not enable sorting. It remains with default status for sorting.
Also I have set for general option: "useExternalSorting: true"
Any ideas regarding how can I refresh the ui-grid? Thanks!