Results 1 to 3 of 3

Thread: DataView Item height

  1. #1
    Sencha Premium User
    Join Date
    Jan 2014
    Posts
    22
    Answers
    2

    Default DataView Item height

    Is there a way to have the items within the data view template have a height be dynamic? For example, I have a dataview within a container who has a flex based size, the dataview takes up 100% of the container height.

    The dataview store has for example 5 items, how can i have each item have a height of (container.height() /5) if this is at all possible.

  2. #2
    Sencha User alex.volfson's Avatar
    Join Date
    Jan 2016
    Posts
    462
    Answers
    60

    Default

    Would something like this work for you?


    The height is calculated on each item based on the number of items in the dataview as a percentage.

  3. #3
    Sencha Premium User
    Join Date
    Jan 2014
    Posts
    22
    Answers
    2

    Default

    If the data view height isn't specified, or it is set to be a flex value this doesn't appear to work as well. I have handled it using an event listener on browser resize and using vanilla java script to adjust the dom elements height as calculated based on the # of records in the store, but was trying to think of a more elegant solution.

Similar Threads

  1. dataview list item with variable height
    By toto00785 in forum Sencha Touch 2.x: Q&A
    Replies: 2
    Last Post: 19 Nov 2013, 4:03 AM
  2. Resize list item height based on content of item.
    By gbaldeck in forum Sencha Touch 2.x: Q&A
    Replies: 1
    Last Post: 22 Oct 2013, 11:47 AM
  3. Dataview List - using mutltiple different Dataview Item?
    By guillaumeCharron in forum Sencha Touch 2.x: Q&A
    Replies: 1
    Last Post: 13 Jun 2013, 1:04 PM
  4. Replies: 1
    Last Post: 25 Sep 2012, 11:04 PM
  5. combobox with drop list whose item height (for each item) is 3 pixels high!
    By stratton in forum Ext 2.x: Help & Discussion
    Replies: 5
    Last Post: 17 Feb 2009, 8:50 AM

Posting Permissions

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