Hybrid View

  1. #1
    Touch Premium Member
    Join Date
    Jun 2011
    Posts
    10
    Vote Rating
    0
    yinkan.li@oocl.com is on a distinguished road

      0  

    Default GridPanel with auto height

    GridPanel with auto height


    now I have a requirement that we need display table data in the page.
    i am trying to use grid to achieve that goal.

    the question is the grid need a fix height when rendering.

    what i need is a auto height for display the dynamic data in the grid store.

    the padding button in the grid is not needed in this page.

    do i have to calculate the height and set the height after adding the data in the grid store?

  2. #2
    Sencha - Community Support Team mankz's Avatar
    Join Date
    Nov 2007
    Location
    Stockholm, Sweden
    Posts
    2,759
    Vote Rating
    108
    mankz is a name known to all mankz is a name known to all mankz is a name known to all mankz is a name known to all mankz is a name known to all mankz is a name known to all

      0  

    Default


    Try setting autoHeight : true

    On your grid config

  3. #3
    Touch Premium Member
    Join Date
    Jun 2011
    Posts
    10
    Vote Rating
    0
    yinkan.li@oocl.com is on a distinguished road

      0  

    Default


    Quote Originally Posted by mankz View Post
    Try setting autoHeight : true

    On your grid config
    that works.

    Thanks a lot!!

  4. #4
    Touch Premium Member
    Join Date
    Jun 2011
    Posts
    10
    Vote Rating
    0
    yinkan.li@oocl.com is on a distinguished road

      0  

    Default


    but another problem comes...
    i have a lot of columns in the grid ... the extra columns were hidden by the grid ...

    i found this in the source code.
    /**
    * @cfg {Boolean} autoHeight
    * true to use height:'auto', false to use fixed height (defaults to false).
    * Note: Setting autoHeight: true means that the browser will manage the panel's height
    * based on its contents, and that Ext will not manage it at all. If the panel is within a layout that
    * manages dimensions (fit, border, etc.) then setting autoHeight: true
    * can cause issues with scrolling and will not generally work as expected since the panel will take
    * on the height of its contents rather than the height required by the Ext layout.
    */

Thread Participants: 1