ui-grid icon indicating copy to clipboard operation
ui-grid copied to clipboard

No event to determine when the grid is fully loaded

Open gbecan opened this issue 11 years ago • 3 comments

We are extending ui-grid in our project by performing some operations after the grid is loaded. However, we did not find an event to determine when the grid is ready. Our current solution is to use $timeout. This solution is only based on luck... We are either too fast or too slow.

Is it possible to create an event that would be fired after the complete load of the grid?

gbecan avatar Jul 22 '15 09:07 gbecan

if you are using ui grid then event- gridApi.core.on.rowsRendered($scope,handler); will suit for you.

kranthikumar-polasa avatar Jul 22 '15 13:07 kranthikumar-polasa

When handing gridApi.core.on.rowsRendered and calling gridApi.cellNav.scrollToFocs(, ) does not result in the cell being selected. When using a timeout as gbecan suggested works but is not ideal. The uiGridCellNavConstants.CELL_NAV_EVEN broadcast isn't bound to the cells when rowsRendered is called.

rdkleine avatar Jan 20 '16 09:01 rdkleine

+1 And if you try to use grid.modifyRows() then rowsRendered is fired multiple times, and still it doesn't work.

nadavelyashiv avatar Nov 09 '16 08:11 nadavelyashiv