show multiple items using list xtype in horizental view

908 Views Asked by At

I'm new to sencha and I need to show two or more record in one row

{
            xtype: 'list',
            flex: 1,
            cls:'home-page-class',
            itemTpl:'<img  src="{image}">',
            store: 'HomePage',
            itemCls:'details',

            useSimpleItems: false,
            variableHeights: true,
            infinite: true,
            disableSelection: true,
            allowDeselect: false,
            scrollToTopOnRefresh: false,

            itemHeight:80,
            plugins: [
                { xclass: 'Ext.plugin.ListPaging', autoPaging: true},
                { xclass: 'Ext.plugin.PullRefresh'}


              ],
}

I tried to play with CSS but sencha create empty items showing it like this empty cells

And I can't change to xtype dataview because I need the listpaging plugin

2

There are 2 best solutions below

0
On BEST ANSWER

I found out that to remove some parameters and add inline:true,this work out for me

{ xtype: 'list', flex: 1, cls:'home-page-class', itemTpl:'', store: 'HomePage', itemCls:'details',

        //useSimpleItems: false,
        //variableHeights: true,
        //infinite: true,
        disableSelection: true,
        allowDeselect: false,
        scrollToTopOnRefresh: false,
        inline:true,
        itemHeight:80,
        plugins: [
            { xclass: 'Ext.plugin.ListPaging', autoPaging: true},
            { xclass: 'Ext.plugin.PullRefresh'}


          ], }
1
On

It is a trick, change your itemTpl from

itemTpl:'<img  src="{image}">',

to

itemTpl:'<img id="img1" src="{image1}"><img id="img2" src="{image2}">',

then set up event listeners to these objects if needed.