Note that there are some explanatory texts on larger screens.

plurals
  1. POSencha Touch ExtJS adding checkbox to list
    text
    copied!<p>Doing development in Sencha Touch 1.0. I'm using Ext.List to render a list, but I also want the start of each list item to start with a checkbox. I also want to change its state based on an array item value, the array which is given to config option. Is there a way to add a simple Ext.form.Checkbox to an Ext.List.</p> <p>If I instead use a <code>&lt;input type="checkbox".../&gt;</code> to the <code>&lt;itemTpl&gt;</code> config option, then it looks ugly in display and secondly I don't know how to listen to events on the checkbox</p> <p>Here is the code for ur eye candy:</p> <pre><code>Ext.regModel('Todos', { fields: ['title', 'completed_at'] }); var groupingBase = { itemTpl: '&lt;div class="contact2"&gt;&lt;strong&gt;{title}&lt;/strong&gt;&lt;/div&gt;', selModel: { mode: 'SINGLE', allowDeselect: true }, // grouped: true, indexBar: true, onItemDisclosure: { scope: 'test', handler: function (record, btn, index) { alert('Disclose more info for ' + record.get('title')); } }, store: new Ext.data.Store({ model: 'Todos', sorters: 'title', getGroupString: function (record) { return record.get('title')[0]; }, data: [todos] //todos array is prev populated with required items' properties }) }; myList = new Ext.List(Ext.apply(groupingBase, { fullscreen: true })); //List ends tasksFormBase = { title: 'Tasks', iconCls: 'favorites', cls: 'card2', badgeText: '4', layout: 'fit', items: [ myList, { xtype: 'checkboxfield', name: 'cool', label: 'Cool' }], dockedItems: [todosNavigationBar] }; </code></pre> <p>//tasksFormBase is then added to a Ext.TabPanel config option</p> <p>any help form Ext master???</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload