user1052804
user1052804

Reputation: 41

ng grid horizontal scroll issue

I'm not quite sure if this has been solved already. I've a grid where there a lot of columns. Hence, there is a horizontal scroll bar that shows up which allows you to scroll to the last few columns.

I don't see the columns after a certain number initially when the grid is empty. With data, I can scroll to the left and see data.

Now if I filter on any one of the columns which didn't show up initially which gives me zero results, I can't scroll back to the column and remove the filter because it's not visible. Please help me. Any help appreciated.

This issue doesn't exist in slick grid on which ng grid is built on.

Thanks

Upvotes: 4

Views: 3557

Answers (2)

kavinhuh
kavinhuh

Reputation: 739

I hope this may solve the issue ,in ma case when there is no row in the canvas the height becomes 0 and which makes the scroll to disappear and thus we can find when the height becomes zero and replace it with a fixed height.

 $scope.canvasStyle = function() {
    if(grid.maxCanvasHt!=0)
    return { "height": grid.maxCanvasHt + "px" };
    else
         return { "height":"3px" };// set height to minimum requirement.

};

Upvotes: 1

Aman Mahajan
Aman Mahajan

Reputation: 1293

Another quick fix is to use a CSS class

.ngCanvas {
    min-height: 1px !important;
}

Upvotes: 4

Related Questions