You can use dataView for this operation. Depending on the storage value, you can add switches. Suppose your store has 5 items besides 5 switches.
var tpl = new Ext.XTemplate('<tpl for=".">', '<div class="thumb-wrap" style="width:210px; float: left;">', '<label >', '<tpl>', '<input type=radioField value={fieldId} >', '</tpl>', '{dataViewFieldName}', '</label>', '</div>', '</tpl>', { }); var me = this; this.items = new Ext.DataView({ store: this.store, tpl: tpl, overClass: 'x-view-over', itemSelector: 'div.thumb-wrap', autoScroll: true }); this.callParent(); },
source share