programing

ui-grid에서 새로 고침 방법을 사용하는 방법

telebox 2023. 3. 18. 08:28
반응형

ui-grid에서 새로 고침 방법을 사용하는 방법

UI 그리드의 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

$scope.gridApi.core.notifyDataChange(uiGridConstants.dataChange)를 사용할 수 있습니다.COLUMN); 컬럼 def를 수정한 후 그리드를 다시 표시하는 방법.

http://ui-grid.info/docs/#!/api/ui.grid.service:uiGridConstants#properties_datachange 상세

언급URL : https://stackoverflow.com/questions/26634063/how-to-use-refresh-method-in-ui-grid

반응형