我正在尝试更新我的ui-grid的columDefs中的可见性选项。更新值后,我需要刷新我的ui-grid。从我的控制器刷新网格的方法是什么?
访问此页面:
http://ui-grid.info/docs/#/api/ui.grid.class:GridApi
在实例化gridApi之后,您可以调用:
//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();
希望有所帮助!
根据您的需要,您可以更改以下ui-grid选项
enableRowHashing:false