diff --git a/src/js/core/factories/GridRenderContainer.js b/src/js/core/factories/GridRenderContainer.js index 5652468372..cb471ee26c 100644 --- a/src/js/core/factories/GridRenderContainer.js +++ b/src/js/core/factories/GridRenderContainer.js @@ -608,7 +608,8 @@ angular.module('ui.grid') var asterisksArray = [], asteriskNum = 0, usedWidthSum = 0, - ret = ''; + ret = '', + pinRightColumn = false; // Get the width of the viewport var availableWidth = self.grid.getViewportWidth() - self.grid.scrollbarWidth; @@ -626,6 +627,14 @@ angular.module('ui.grid') // Skip hidden columns if (!column.visible) { return; } + if (pinRightColumn) { + availableWidth += self.grid.scrollbarWidth; + } + + if (!pinRightColumn && column.colDef.pinnedRight) { + pinRightColumn = true; + } + if (angular.isNumber(column.width)) { // pixel width, set to this value width = parseInt(column.width, 10);