Grid data is not seen until the window is resized
I've migrated from ngGrid to use the latest ui-grid. When the page is loaded I see an empty grid, on checking the developer tools I realized that data is indeed come to the widget. When I resize the window the grid data is visible. This is happening when the page is loaded for the first time. Subsequent changes in the data are seen properly. I tried to change the default grid options, but they didn't fix the issue.
Not sure if this is already observed and reported, please let me know if I can do something to fix this.
What are your grid options?
+1
vm.gridOptions = { enableFiltering: true, enableRowSelection: true, enableColumnMenus: false, enableRowHeaderSelection: false, multiSelect: false, data: rallies, paginationPageSizes: [ 10, 20, 30 ], paginationPageSize: 15, enableVerticalScrollbar: uiGridConstants.scrollbars.NEVER, rowTemplate: '
' }; vm.gridOptions.minRowsToShow = vm.gridOptions.paginationPageSize + 1;
Sorry, for missing to reply earlier. We are not passing any additional parameters.
gridOptions = { data: data.rows, columnDefs: data.columnNames, enableSorting: true };
for ng-grid i think you need to call gridOptions.ngGrid.buildColumns(); for ui-grid you need to call gridApi.core.refresh();
Have you defined the div width ? The issue goes away if you define the width.
@abhinavsayan - thanks a ton for this suggestion! None of the other answers to this bug worked for me.
prefect!! set width. Thats it