Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use refresh method in ui-grid?

I am trying to update visibility option in the columDefs of my ui-grid. After updating the value I need to refresh my ui-grid. What is the way to refresh my grid from my controller?

like image 469
orikoko Avatar asked Oct 29 '14 15:10

orikoko


People also ask

What does kendo grid refresh do?

Renders all table rows using the current data items.

What is UI grid?

UI-Grid 4.0 (formerly ng-grid), is a 100% angular grid written with no dependencies other than AngularJS. It is designed around a core grid module and features are layered on as angular modules and directives. This keeps the core small and focused while executing very complex features only when you need them.


1 Answers

Visit this pages:

  • GetAPI - http://ui-grid.info/docs/#/api/ui.grid.class:GridApi
  • Specific API - http://ui-grid.info/docs/#/api/ui.grid.core.api:PublicApi

http://ui-grid.info/docs/#/api/ui.grid.class:GridApi

After having instantiated your gridApi, you can just call:

//instantiate (not so obvious) // whatever scope attribute your binding to gridOptions $scope.gridOptions = {   onRegisterApi: function(gridApi){ $scope.gridApi = gridApi;} } //then later $scope.gridApi.core.refresh(); 

Hope that helps!

like image 104
Jose Avatar answered Sep 19 '22 18:09

Jose