Results 1 to 3 of 3

Thread: Component based Dataview and wrapping of items

  1. #1
    Sencha User
    Join Date
    Jun 2009
    Posts
    419
    Vote Rating
    2
      0  

    Default Component based Dataview and wrapping of items

    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?

    Thanks

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,326
    Vote Rating
    1297
      0  

    Default

    display: inline-block and some width on the components may do the trick.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

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

  3. #3
    Sencha User
    Join Date
    Aug 2011
    Location
    London
    Posts
    454
    Vote Rating
    22
      0  

    Default Have a look here

    Take a look at the CSS in the example here:

    http://rdougan.github.com/barebones-tiled-dataview/

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

    :-)

Posting Permissions

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