sencha-touchsencha-architectsencha-touch-2.1

How to display list item border in sencha touch


Can anybody tell How to display list item border in sencha touch .The below code i have implement default border is not coming for list

 {
            xtype:'list',
            height: '80%',
            store:'SearchStore', 
             itemTpl : '<img src="{country}" width="30" heigh="30"></img><span>{name} </span>',

     }

Solution

  • I tried code. A few modifications you can do are:

    {
        xtype: 'list',
        store: 'SearchStore',
        itemTpl: [       // It works perfectly
            '<div>',
            '    <img style="width:30px;height:60px;vertical-align:middle" src="{country}">',
            '    <span style="">{name}</span>', 
            '</div>'
        ].join('')
    }
    

    Your mistakes: (Though it may not create that problem)

    1. height was heigh

    2. Extra </img> tag was there.

    Let me know if you face any issue. (And share the screenshot too)