Author Topic: Row height Align with Grid height  (Read 2067 times)

lsl

  • Pro Deluxe
  • Jr. Member
  • *
  • Posts: 67
    • View Profile
Row height Align with Grid height
« on: April 29, 2017, 03:05:07 pm »
There is a grid with one record only with memo fields. The memo rows are many and always not able to display the complete information.
However, the grid height will be varies according to the screen size.
It there a method to set the row height align with the grid height so that we can get more rows in the memo as possible?

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Row height Align with Grid height
« Reply #1 on: May 01, 2017, 09:09:46 am »
One quick option is to set wrap to false.

Other way is to wrap cell content in a div of specified max-height ( div height can also be made dependent upon grid height).

column.render = function(ui){
  var ht = this.widget().height();
  return "<div style='max-height:"+ ht/2 +"px;'>"+ui.cellData+"</div>";
}