I can't help thinking my bug is rather small but I've been through all the steps and checked all the documentation and I can't find anything that fixes my problem. I'm using the grid with pagination and anytime I try to display more than 20 rows a bug occurs where the rows displayed cut off after row 4 and the rest of the space is filled with whitespace. Everything else with the grid works fine but I can't find anything that lets me display more than 20 rows in the grid.
Please make sure each of the following is true before submitting a new issue. We are a small team with limited time and it is very difficult to manage issues if they aren't reported correctly.
- [ ] This is a bug report, not a question on how to use the grid.
Use Stack Overflow or Gitter for questions. - [ ] You have searched the open issues to see if this bug has been filed before. We don't want duplicate issues.
- [ ] You have reviewed the tutorials and documentation to ensure you are using the grid correctly. ui-grid.info
- [ ] You are using the latest version of the grid. Older versions are not patched or supported.
- [ ] You have provided steps to recreate your bug. A plunkr is even better.
I've tracked down the source of the error but I still don't have a solution. I included a style element with my UI Grid DIV tags. The style element has a height set to 40px, when I did some fooling around in plunker and added the style height to a previously working grid the error was duplicated. Here's what I'm talking about:
Now I know this is what's cutting off my records but when I remove the style element from my project the header ends up filling the whole grid and you can't see anything. Is there another way to control the header?
Set the property (in your grid options): virtualizationThreshold to a larger number. I believe the default is 20.
Thanks to KegDemon, that solution fixed the problem. My only issue now is trying to build a client side function to update the grid rows when the user chooses a new page size from a drop down menu. I'm in a bind because in this case I can't just use the native pagination controls. When I use the following function nothing happens : $scope.updateRows = function () { var newRows = $("#gridRows").val(); $scope.gridOptions.options.paginationPageSize(newRows); $scope.gridOptions.queueGridRefresh(); }
Using a select you can hook into $scope.gridOptions properties:
$scope.gridOptions.paginationPageSize [ng-model]
$scope.gridOptions.paginationPageSizes (array) [ng-options]
Thanks again KegDemon(cool name by the way) I tried the following and all I got in the browser was an empty drop down list. Am I missing something? select name="gridRows" id="gridRows" ng-model="$scope.gridOptions.paginationPageSize" ng-options="$scope.gridOptions.paginationPageSizes"
<select ng-model="gridOptions.paginationPageSize" ng-options="item for (key, item) in gridOptions.paginationPageSizes"></select>
Hmm, it's definitely close, as the page is first loading I can see the first value in the select however, when the grid is finished rendering the select becomes blank again. When I look at the html in the browser it only shows 1 option in the select with a value of "?". Here's my select as it's currently written: select name="gridRows" id="gridRows" ng-model="gridOptions.paginationPageSize" ng-options="item for (key, item) in gridOptions.paginationPageSizes"
It's really strange I can see the initial page size value in the select only before the grid renders. Basically it just flashes for 1 or 2 seconds, then when the grid fills with data the select goes blank and appears empty.
Please provide a Plnkr with what's going on.
Closing due to inactivity.