0

I have problem with ng - grid in cellTemplate i hane ng-repeat :<div ng-repeat="address in row.entity.addresses>" but height of row is constant and some of addresses i can't see

what i need to do?

Angular ng-grid row height

this solution removes cell's border

Community
  • 1
  • 1
rom16rus
  • 45
  • 1
  • 2
  • 8
  • You can't do dynamic row heights with ng-grid. This was answered dozens of times before. Look at something like trNgGrid which uses a html table instead of divs: http://moonstorm.github.io/trNgGrid – mainguy Oct 02 '14 at 08:38
  • Seems like github.io is down at the moment. Try again later. – mainguy Oct 02 '14 at 08:39

1 Answers1

0

This is a commonly requested feature for ng-grid, but currently there aren't any plans to add it. [0]

This is because table virtualization is a big feature for ng-grid that's important to a lot of people, and they haven't written/figured out logic to quickly estimate the total height of all rows while only rendering, for example, 30 of them.

At this time your options are to look at other grid/table libraries, or to figure out another UX that you're okay with (e.g. maybe only render the first 60 characters and provide the rest in a tooltip when the user hovers/taps the cell)

DRobinson
  • 4,441
  • 22
  • 31
  • You are right with your answer, but I was always asking me why it is important to virtualize/fake a table when you want to display table data and have a table rendering engine at hand in your browser. Don't get me wrong, I'm using ng-grid by myself but I never understood why they have to do this so complicated and bug prone. Any clues? – mainguy Oct 03 '14 at 14:52
  • 1
    Virtualization can be very helpful if you have very large tables. The DOM becomes very slow on most computers if you have 100,000 rows. For one thing, styling will be calculated for rows that may never even be looked at. Almost every benefit that you can find for lazy-loading in general (as in, in other fields, such as databases), can be applied to table virtualization. – DRobinson Oct 03 '14 at 17:37
  • Ok, that's reasonable. I have never worked with such large tables. Thanks for the explanation. – mainguy Oct 04 '14 at 08:03