Reputation: 433
I want to hide the grid if I don't have data. I am using angular so I am doing it with ng-show="vm.showGrid" , after my grid is displayed it is not looking good until I am scrolling the grid or just resizing my page. What can fix it ?
Upvotes: 1
Views: 719
Reputation: 2157
Not sure what do you mean by not looking good, so I am assuming the columns size in the grid doesn't meet your expectation. If that's the case, you can call these mentions AFTER you show the grid.
1) gridAPI.sizeColumnsToFit()
, to get columns to adjust in size to fit the grid horizontally.
2) columnAPI.autoSizeColumns(colKeys)
, you can pass all the columns as colKeys to auto size all the columns
Upvotes: 1