Fixed columns are not getting updated when updating the datatable.

Fixed columns are not getting updated when updating the datatable.

nkrishnannkrishnan Posts: 1Questions: 1Answers: 0

I have created a datatable using angularjs and applied fixed columns on the same.

0">
Misc Status Task/Group Name Assigned User Responsible Party Actual Start Date % Complete
0 && x.ParentId != 0"> image 0 && x.ParentId != 0"> image {{status.StatusName}}
image image {{x.TaskName}}
   {{x.TaskName}}
<%--<option ng-repeat="contact in Contacts" value="{{contact.ContactID}}" ng-selected="contact.ContactID == x.Assigned">{{contact.ContactName}}--%> {{x.Party_Resp}}

and in my controller I have defined my dtOptions like below:

//define options and columns for PI Flow grid
$scope.dtOptions = DTOptionsBuilder.newOptions()
.withOption('order', [])
.withOption('paging', false)
.withOption('searching', false)
.withOption('scrollY', '450px')
.withOption('scrollX', true)
.withOption('scrollCollapse', true)
.withOption('lengthChange', false)
.withOption('autoWidth', false)
.withOption('deferRender', true)
.withFixedColumns({
leftColumns: 3,
heightMatch: 'auto'
});

$scope.GetPITasks = function () {
var url = "PIService.svc/GETTASKDETAILS?PROJECTID=" + $scope.ProjectId + "&random=" + Math.random(); //PIFLOW.json

        $http.get(url).success(function (response, status) {
            $scope.PITasks = response;
        }).error(function (response, status) {
            $scope.StatusMsg = "Error in fetching PI flow details.";
        });
    }

When I add a note for a selected row, my original datatable gets updated immediately without refreshing the datatable but, the cloned datatable for which the fixed columns are applied doesn't get updated. Is there any way to reload the datatable without refreshing the entire table? I used $scope.dtInstance.reloadData(null, false) but it doesn't help out.

Please do the needful and give your suggestions.

Sign In or Register to comment.