ui-grid cannot rendered correctly when using ng-show/ng-hide, if you press F12 on the keyboard, it can do it correctly
My code is as below:
<div class="gridStyle" ng-grid="gridOptions" ng-show="flag"></div>
when i set the flag to true, the grid cannot render correctly, if you press F12 on the keyboard, it can show correctly!
try it like this..
<div ng-show="flag">
<div class="gridStyle" ng-grid="gridOptions"></div>
</div>
is working for me...
@kandarpbhesaniya thank u, but it didn't work for me!
Using ng-if fixed it for me.
So, like this:
<div class="gridStyle" ng-grid="gridOptions" ng-if="flag"></div>
:+1: I've seen the same problem, if I do ng-show on the parent div that contains the ui-grid, all kinds of weird things do not work right. ng-if works fine though.
This is documented in http://ui-grid.info/docs/#/tutorial/108_hidden_grids, so whilst it's not ideal behaviour, it is expected behaviour. You should use ng-if. On that basis, closing.