ui-grid icon indicating copy to clipboard operation
ui-grid copied to clipboard

Missing header

Open dimalama opened this issue 11 years ago • 13 comments

Hello, I face time to time issue when my ui-grid missing header and load only grid "body". Please take a look at screenshot http://i.imgur.com/f90XYiA.png What could be a reason of that and how I can fix it?

Thank you

dimalama avatar Apr 07 '15 19:04 dimalama

It looks the header itself is present, but maybe the header cell contents themselves are missing?

It's hard to tell from your image as the grid appears to be heavily customized. Could you annotate it or a new image to show where you expect the missing contents to be seen, visually?

c0bra avatar Apr 07 '15 21:04 c0bra

I'm using my custom header cell templates and I load them. It happens that firstly ui-grid body cells templates loads and then header cell templates. Sometimes the header shows, sometimes not and I can't figure out why it happens. Here's example when it works like supposed to http://i.imgur.com/Z0dVdim.png, and here is pictures what has been loaded http://i.imgur.com/2yg8NX3.png (loaded body cells templates first) then http://i.imgur.com/YtRZrbs.png ( rowTemplate and headerCellTemplates ) then it load some other stuff.

When the header missing we have exactly the same templates load order http://i.imgur.com/ckZEBZX.png http://i.imgur.com/As3LtKt.png and also as you can see the html content is present inside the query http://i.imgur.com/1xgn1c7.png but it doesn't apply to ui-grid http://i.imgur.com/IfBDvgg.png. That is my code which I use to define header templates and the path to them http://i.imgur.com/NpA7TVO.png

Could you give me some ideas why it happens? Because that is strange to me. What is the most interesting it happens time to time. For example once in 5+ page reloads in Chrome.

dimalama avatar Apr 07 '15 22:04 dimalama

Also sometimes it loads partially like this http://i.imgur.com/VS1mw2w.png

dimalama avatar Apr 07 '15 22:04 dimalama

Are you able to provide a plunker for this? It's hard to debug from screen shots.

PaulL1 avatar May 16 '15 06:05 PaulL1

More information sought, not forthcoming after 3 weeks, closing, please reopen or reraise if this is still an issue for you.

PaulL1 avatar Jun 06 '15 01:06 PaulL1

Hello! I am also experiencing this issue. @dlukianenko did you manage to find a solution?

spencerhandley avatar Jun 10 '15 21:06 spencerhandley

No, I gave up and build my own custom grid If you find the solution please let me know

dimalama avatar Jun 10 '15 21:06 dimalama

Will do!

On Wed, Jun 10, 2015 at 2:54 PM, dlukianenko [email protected] wrote:

No, I gave up and build my own custom grid If you find the solution please let me know

— Reply to this email directly or view it on GitHub https://github.com/angular-ui/ng-grid/issues/3229#issuecomment-110927265 .

Spencer

spencerhandley avatar Jun 11 '15 21:06 spencerhandley

I had the same issue... Including the templates as hard coded strings instead of lazy loading them solved it for me. Hard coded strings are also used for the default ui-grid templates. I don't think ui-grid actually fully supports template loading? Can't find anything about it in the documentation at least, could somebody else to confirm that?

marcusrettig avatar Jan 15 '16 13:01 marcusrettig

I'm not sure if this is exactly the same issue I've run into.

It seems that when the UI-Grid is set to use html files as templates, some of them are not properly instantiated. Using version 3.2.1, at line 1038 in ui-grid.js, it seems that the first time my grid is loading, the headers that have custom templates are seen as undefined.

When I scroll and the grid reloads the respective headers, they appear ok. It's only on page load that they are undefined. I'm still digging to see what could be the cause of this.

EDIT: As a work-around (if you wanna store the templates in separate files), I just wrap the html of the template in a <script type="text/ng-template"> tag and ng-include it in the html file I want to use it. Using $templateCache seems to work with this although at some point it might not seem worth it.

adrianlungu avatar Aug 23 '16 17:08 adrianlungu

I was able to fix similar problem here

rosslyn-adambielasty avatar Sep 14 '16 10:09 rosslyn-adambielasty

I am a normal github user.I can't reopen the issue.I'm requesting @PaulL1 or @c0bra to reopen the issue.The issue is still there

karthik2901 avatar Feb 20 '17 11:02 karthik2901

I'm using version 3.2.1

karthik2901 avatar Feb 20 '17 13:02 karthik2901