Results 1 to 7 of 7

Thread: DataView dynamic size

  1. #1
    Sencha User
    Join Date
    Jul 2011
    Location
    Holland
    Posts
    98
    Answers
    2

    Default Answered: DataView dynamic size

    Good day,

    To be able to view a DataView or a List, the parent container should have the 'Fit' layout, or the DataView should has a fixed height. Without that, the DataView or List won't show.

    I'd like to add a small panel underneath a DataView. The size of the DataView should be the size of the content in the DataView, so it shouldn't be a fixed size. I couldn't figure this out to get this done. Anyone who can help me?

    Thank you,

  2. Set scroll:null and don't give the dataview a height.

  3. #2
    Sencha User
    Join Date
    Feb 2011
    Location
    Düsseldorf, Germany
    Posts
    597
    Answers
    35

    Default

    Do you want the panel underneath the DataView to be visible all the time or is it added belowthe DataView, so that it becomes visible after scrolling to the end?
    • Kurt001

    Code Review | Send PM


    Need to include a test case use:
    https://fiddle.sencha.com/#home

  4. #3
    Sencha - Support Team
    Join Date
    Oct 2011
    Posts
    4,108
    Answers
    342

    Default

    Set scroll:null and don't give the dataview a height.
    Get more personalized support via a support subscription.

    Need more help with your app? Hire Sencha Services [email protected]

    When posting code, please use BBCode's CODE tags.

    Need to include a test case use:
    The official Sencha Fiddle

  5. #4
    Sencha User
    Join Date
    Jul 2011
    Location
    Holland
    Posts
    98
    Answers
    2

    Default

    That's it! Thank you!

  6. #5
    Sencha User
    Join Date
    Jul 2011
    Location
    Holland
    Posts
    98
    Answers
    2

    Default

    Hm! This doesn't work for a List - which is a DataView too. Any clue how to do the same for a list?

  7. #6
    Sencha User
    Join Date
    Feb 2011
    Location
    Düsseldorf, Germany
    Posts
    597
    Answers
    35

    Default

    Dataviews (dataview.DataView) are meant to contain all data in the dom.
    Lists (dataview.List) are meant to contain only a part of the data inside the dom.

    You can specify how many data to show in a list with the buffer option, otherwise it will only show as many as fit in the given height of the list (plus one).

    So what you want in the above example is a Dataview. Therefore lists need a height and dataviews can be set to scrollable: null to take as much space as they need.
    • Kurt001

    Code Review | Send PM


    Need to include a test case use:
    https://fiddle.sencha.com/#home

  8. #7
    Sencha User
    Join Date
    Jul 2011
    Location
    Holland
    Posts
    98
    Answers
    2

    Default

    That does make sense. Thanks for the explanation.

Posting Permissions

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