Results 1 to 3 of 3

Thread: Set vertical alignment on dataview

  1. #1

    Default Answered: Set vertical alignment on dataview

    Hello Everyone,

    I have a panel (vbox layout in case it's important) containing a dataview.
    This panel is to be called from several sources in my application and should display the dataview either horizontally or vertically.

    I am using the "orientation" config key to define the axis of the dataview but it always renders my items horizontally.

    Any hints?

    My dataview:

    Code:
    dataView = Ext.create({xtype: 'dataview',
                autoScroll: true,
                scrollable: 'vertical',
                tpl: myTpl,
                itemSelector: 'div.dataview-doc-item',
                store: myStore
    
            });
    And here is my template:
    Code:
    varmyTpl= newExt.XTemplate('<div class="dataview-doc-container">',
                '<tpl for="." >',
                    '<tpl  if="selected == true">',
                        '<div  class="dataview-doc-item" style="opacity: 1;">',
                            '<img src="' + myUrl + '/{idDoc}" width="72" height="72" />',
                            '<tpl  if="defaut == true">',
                                '<br/><i>Par d&eacute;faut</i>',
                            '</tpl>',                    
                            '<h4>{[values.lib.substr(0, 10)]}</h4>',
                        '</div>',
                    '<tpl else>',
                        '<div  class="dataview-doc-item" style="opacity: 0.5;">',
                            '<img src="' + myUrl + '/{idDoc}" width="72" height="72" />',
                            '<tpl  if="defaut == true">',
                                '<br/><i>Par d&eacute;faut</i>',
                            '</tpl>',                    
                            '<h4>{[values.lib.substr(0, 10)]}</h4>',
                        '</div>',
                    '</tpl>',
                '</tpl>',
    
    '</div>');
    Thanks in advance.

    BR.

  2. If your .dataview-doc-items are display:block they should flow downwards.

  3. #2
    Sencha User Animal's Avatar
    Join Date
    Mar 2007
    Location
    Bédoin/Nottingham
    Posts
    30,892
    Answers
    41

    Default

    If your .dataview-doc-items are display:block they should flow downwards.

  4. #3

    Default

    Hello!

    Id did the trick, thanks a lot!

    Pierre

Similar Threads

  1. fieldLabel Vertical Alignment
    By gretags in forum Ext 3.x: Help & Discussion
    Replies: 3
    Last Post: 5 May 2011, 11:14 PM
  2. Grid vertical alignment
    By laitinen in forum Ext GWT: Discussion
    Replies: 4
    Last Post: 30 Sep 2010, 6:38 AM
  3. [2.0.1] Checkbox vertical alignment
    By jit in forum Ext 2.x: Bugs
    Replies: 10
    Last Post: 27 Feb 2009, 3:35 AM
  4. Vertical alignment in Grid
    By hothenplotz in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 2 Sep 2008, 3:10 AM
  5. Reg. vertical alignment of tab
    By madhukumar in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 18 May 2008, 11:16 PM

Tags for this Thread

Posting Permissions

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