3

This plunker populates a static Html Table correctly based on a search for 'Tim' (Json Data).

    var arrItem = [];
    angular.forEach($scope.items, function (item) {
    if(item.fname === enteredValue.firstName || item.lname === enteredValue.lastName
    ||item.address === enteredValue.address && item.phone === enteredValue.phone){
        arrItem.push({
            first: item.fname,
            last: item.lname,
            address: item.address,
            phone: item.phone

        });

Now I want to place this data in a NG-Grid.
This plunker attempts to load this data into NG Grid based on a Tim Search. I tried so many ways to do this. Should I be using ng-repeat? Ng-table instead of ng-grid?

  $scope.source= arrItem;
  $scope.getPagedDataAsync($scope.source, $scope.pagingOptions.pageSize, $scope.pagingOptions.currentPage); 
Sunny
  • 145
  • 1
  • 3
  • 14
  • There's an interesting discussion about here, maybe can help you: http://stackoverflow.com/questions/21375073/best-way-to-represent-a-grid-or-table-in-angularjs-with-bootstrap-3 – Ricardo Pontual Jul 01 '15 at 03:05

1 Answers1

1

See my answer here: Can I use entered value through ng-model to populate angular ng grid?

Community
  • 1
  • 1
Andy Lewis
  • 334
  • 1
  • 7