View Full Version : Component based Dataview and wrapping of items

19 Dec 2012, 7:32 AM
I am playing around with a component based Dataview that uses buttons for the component type.

What I would like to achieve is to have the buttons flow left to right across the screen and to wrap onto new rows no matter how many records are in the store.

So for example, I have 5 records, and I set the width of DataItem to 50%. I would like for the Dataview to display 2 buttons, followed by 2 buttons below on a second row and then the 5th button on a final third row.

I would imagine I need to do this via CSS, but am unsure how best to proceed.

Can anyone help please?


21 Dec 2012, 8:12 AM
display: inline-block and some width on the components may do the trick.

22 Dec 2012, 4:01 AM
Take a look at the CSS in the example here:


You could just make the padding a bit bigger and it should do what you want