View Full Version : DataView Item height

10 Feb 2016, 1:35 PM
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.

12 Feb 2016, 10:19 AM
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.

23 Feb 2016, 3:08 PM
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.