ng-grid is not showing complete data
Hi,
i am using below code to populate my grid using service response.
var app = angular.module('MyGridApp', ['ngGrid']);
app.controller('bodyController', ['$scope', '$http', '$domUtilityService', function ($scope, $http, $domUtilityService) {
//debugger;
/*
$scope.myData = [{ name: "Moroni", age: 50 },
{ name: "Tiancum", age: 43 },
{ name: "Jacob", age: 27 },
{ name: "Nephi", age: 29 },
{ name: "Enos", age: 34 }];
$scope.gridOptions = {
data: 'myData'
};
*/
$scope.GridDetails = [];
$http.get('http://localhost:342345/api/FlexiData/GetData')
.success(function (Griddata, status, headers, config) {
//debugger;
$scope.GridDetails = angular.fromJson(Griddata);
})
.error(function (data, status, headers, config) {
//debugger;
alert("error");
});
$scope.gridOptions = {
data: 'GridDetails'
};
$domUtilityService.RebuildGrid;
}]);
My grid is only showing 6 rows only but in actual 'Griddata' has 500+ rows. I have included following JS files in my code. http://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js https://cdnjs.cloudflare.com/ajax/libs/ng-grid/2.0.11/ng-grid-flexible-height.min.js https://cdnjs.cloudflare.com/ajax/libs/ng-grid/2.0.11/ng-grid.css https://cdnjs.cloudflare.com/ajax/libs/ng-grid/2.0.11/ng-grid-layout.min.js
Please help me, where i am doing mistake.
Should $domUtilityService.RebuildGrid; be $domUtilityService.RebuildGrid();?
I tried below two statement one by one
$domUtilityService.RebuildGrid();$domUtilityService.RebuildGrid($scope.gridOptions.$gridScope, $scope.gridOptions.ngGrid);
after applying above two statement, it is stop showing any data on Grid.
I used ng-style="{height: (gridOptions.data.length*30)+32+'px'} style sheet in the grid. it start showing me few more ROWS, but still it is not showing complete data and it make grid slow as well.
This issue was moved to angular-ui/ng-grid-legacy#4
I was facing any issue with ng-grid column width not adjusting automatically