Closed DevQueen closed 8 years ago
I have an ng-click in a template on my Grid. The method on the click goes to the SQL Database and makes changes to the dataSource of the grid. I'm trying to refresh the grid after the method executes, but nothing I've tried has worked.
Here is my gridOptions:
$scope.gridOptions = { dataSource: { transport:{ read:{ url:'/SSQV4/SSQV5/Search/GetBusinessUnits', type: "GET" } }, sort: {field: "intOrder", dir:"asc"} }, batch: false, reorderable: true, sortable: false, editable: "inline", columns: [ { template: '<i class="fa fa-chevron-circle-up" style="cursor:pointer" ng-click="MoveUp(#=OperatorBusinessUnitID#)"></i> <i class="fa fa-chevron-circle-down" style="cursor:pointer"></i>', title: "List Order" }, { field: "intOrder"}, { field: "OperatorBusinessUnitID", title: "Business Unit ID" }, { field: "vchDescription", title: "Business Unit Name" }, { field: "vchOperatorSystemID", title: "Operator System ID"}, { command: [ { name: "edit", text: " " }, { name: "destroy", text: " " }, ], title: "Action" } ] };
Here is the method called by the ng-click:
$scope.MoveUp = function (id) { operatorService.moveup(id) .success(function (data) { $scope.businessUnits = data; $scope.grid.dataSource.transport.read(); $scope.grid.refresh(); }); };
As you can see, I've tried a couple of different ways to refresh the grid:
<div kendo-grid="grid" k-options="gridOptions" k-rebind="gridOptions"></div>
ANY assistance is greatly appreciated!
I have an ng-click in a template on my Grid. The method on the click goes to the SQL Database and makes changes to the dataSource of the grid. I'm trying to refresh the grid after the method executes, but nothing I've tried has worked.
Here is my gridOptions:
Here is the method called by the ng-click:
As you can see, I've tried a couple of different ways to refresh the grid:
ANY assistance is greatly appreciated!