0

I am using ui-grid. The left panel has search filters and a search button which populates data into grid in right panel (initially grid renders without data). Application has two separate controller one for search panel and another for grid. Now i am using shared service to pass data from searchController to gridController but data in grid is not displaying. I can see gridOptions.data is set by that function. console.log( $scope.gridOptions.data)//length is 2 here. If i tried to call http.get directly from grid controller and bind data in success object, grid populates properly.

I tried different methods to refresh/reload (see below) the grid but no results. $scope.gridApi.core.refresh();

Any suggestion.

1
  • Can you please do a plunker for it. Commented Dec 14, 2016 at 0:44

1 Answer 1

1

You have to assign data to $scope.gridOptions.data in your grid controller.

I assume, you are getting that data from your shared service.

Also ensure, search button generates an event which fetches data from shared service, and assigns it.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.