Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15

Thread: GridPanel's maxHeight and autoHeight config options?

  1. #11

    Default

    I think the part you are not understanding here is that the height of a grid has absolutely nothing to do with how many rows of data are loaded into it. You tell it what its height will be, and that is what it is. If there are more rows than can fit in the configured height, a vertical scrollbar will appear.
    The autoHeight and maxHeight configs are only used when the grid is rendered (either initially or on a resize).

  2. #12

    Default

    devnull I think that I understand it now ,
    but still I don't know when can I use maxHeight config and what does it give me? Can you give me a simple example?,
    or maybe maxHeight config is simple documentation bug as carol.ext wrote?

  3. #13

    Default

    It would most likely be used in a resiable layout where it is desired to have the component never grow beyond a certain size regardless of how large its container becomes. I really cant think of any real world use for it honestly. Note that I could see a use for its opposite, minHeight, to prevent components from being sized too small and having their children either overlap or be covered up by adjacent components (scrollbars would appear instead).

  4. #14

    Default

    I can see your point.

    Thanks a lot devnull !

  5. #15
    Ext JS Premium Member
    Join Date
    Feb 2008
    Posts
    17

    Default

    Quote Originally Posted by Animal View Post
    The GridPanel scrolls it's contents. It must be told how high to make itself.

    You can probably postprocess it after it loads and adjust the height, but what's the point? It would create an ugly application. Aren't you using a Viewport with fluid page design?
    There are several situations it would be handy that grid could autoHeight, like in an accordion view in the centerpart of a border layout..

    Anyone?

Page 2 of 2 FirstFirst 12

Posting Permissions

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