Results 1 to 3 of 3

Thread: Determine the height of a grid

  1. #1
    Sencha User
    Join Date
    Aug 2013
    Posts
    8
    Vote Rating
    0
      0  

    Default Answered: Determine the height of a grid

    Hello all,

    I have a simple Grid based on http://www.sencha.com/examples/#ExamplePlace:basicgrid
    I would like the ContentPanel root (in the example) to fit the grid without the space between the grid and the ContentPanel. Is there a way to determine the height of the grid, so I can get set the height within the ContentPanel or should I use a different type of Panel?

    Best Regards

    grid.png

  2. The grid needs to be given its size explicitly by either setting it to the grid, or by a parent container that implements resizable.

    The layout containers guide covers the possible containers that can be a parent container that could give the grid its size. Depending on the layout, it could be VerticalLayoutContainer or maybe even better the CssFloatLayoutContainer.
    http://docs.sencha.com/gxt-guides/3/...ontainers.html

    This covers how layout data and how containers are sized and how those containers can size their children.
    http://docs.sencha.com/gxt-guides/3/...s/Layouts.html

    I suspect you wouldn't need to find the height of the grid at this point.
    grid.getOffsetHeight()

    Brandon

  3. #2
    Sencha - Support Team
    Join Date
    Jan 2012
    Location
    Arlington, WA
    Posts
    871
    Answers
    12
    Vote Rating
    24
      0  

    Default

    The grid needs to be given its size explicitly by either setting it to the grid, or by a parent container that implements resizable.

    The layout containers guide covers the possible containers that can be a parent container that could give the grid its size. Depending on the layout, it could be VerticalLayoutContainer or maybe even better the CssFloatLayoutContainer.
    http://docs.sencha.com/gxt-guides/3/...ontainers.html

    This covers how layout data and how containers are sized and how those containers can size their children.
    http://docs.sencha.com/gxt-guides/3/...s/Layouts.html

    I suspect you wouldn't need to find the height of the grid at this point.
    grid.getOffsetHeight()

    Brandon

  4. #3
    Sencha User
    Join Date
    Aug 2013
    Posts
    8
    Vote Rating
    0
      0  

    Default

    Thank you Brandon, ViewPort is what I used and it works well.

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
  •