Results 1 to 4 of 4

Thread: Grid auto height

  1. #1
    Sencha Premium User
    Join Date
    Jul 2019
    Posts
    3

    Question Answered: Grid auto height

    How can I give a grid a auto height according to it's number of rows?
    I've seen in previous versions of Ext JS a property "autoHeight" existed but it seems to be gone.
    If I don't specify a height no rows will be displayed and my grid will always look like this:
    grid.png

    I'm using Ext JS 6.7 with modern toolkit.
    I hope you can help me

  2. "Fit" layout will set the height of the grid as its parent. If you want the grid to use the height of its content you should use "auto" (the default one) layout on the conatiner.

  3. #2

    Join Date
    Dec 2013
    Location
    Italy
    Posts
    88
    Answers
    9

    Default

    If you don't specify a height the grid should take the height of its content (header + rows). Can you please share the layout configs of the page where the grid is?

  4. #3
    Sencha Premium User
    Join Date
    Jul 2019
    Posts
    3

    Default

    The grid is inside a container with "layout: 'fit'".
    Somehow I can't find out what causes the grid not to take enough space.

  5. #4

    Join Date
    Dec 2013
    Location
    Italy
    Posts
    88
    Answers
    9

    Default

    "Fit" layout will set the height of the grid as its parent. If you want the grid to use the height of its content you should use "auto" (the default one) layout on the conatiner.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •