Open jcamorgan opened 11 years ago
Obviously I can't debug this, but the grid actually initializes in the constructor, so your call to resizeGrid() for the width should be before it. (The grid.render()
call is unnecessary.)
Thanks for the reply! It's not a horizontal filling of the window that's the problem. It is the viewPort not completely filling the space allocated for the grid canvas. I have created a plunk to demonstrate the issue:
http://plnkr.co/edit/Yw7CuWojbyMQlPGSRSU4?p=preview
It works fine in FF and IE but does not like Chrome. Clicking the resizeCanvas button calls this method on the grid, which does the job of fixing the viewport.
You have to change the CSS links in your plunk, they are pointing to an inaccessible server.
Right... sorry. Updated them now.
There seems to be some sort of a timing issue with loading/parsing CSS. After setting the height of the '#dataGrid', it reads it as a different value, but it all works when debugging. I don't know much about how AngularJS initializes things to give you a better answer. Adding 'setTimeout(function() { grid.resizeCanvas(); }, 0);' at the end of the initialization does fix it though.
Seems pretty strange... I had already added the timeout workaround but was kind of hoping there was a more fundamental fix. Still, as long as it works! Thanks!
Hi, Any solution since then? Cordially
On loading a new grid with data in a DataView, the ViewPort does no completely fill the grid space (vertically). See screenshot here: http://prntscr.com/1fikdx
This only seems to be a chrome issue. I have tested it in the latest FF an IE.
I have built in a button to call the grid.resizeCanvas() method, and then the viewPort fills the grid.
Here's the grid initialization code: var users; var orgList;
// Set the height for the detail panel $('#bodyDetail').css('height', $(window).height() - 135);
// Initialize grid var dirtyRows = [];
// Fix the grid size according to the window width resizeGrid($(window).width() - $('#sideBar').width() - 40);
// dataView.setFilter(myFilter); // dataView.setFilterArgs(0); dataView.endUpdate(); grid.render(); // End initialize grid