-
List with checkbox
Hi all,
I am a newbie in Sencha and working on a demo application. I want to show list with checkbox i.e with each list item there would be a checkbox and when user check it that particular list item's text color will be changed and vice versa...
Below is the code snippet :
{
xtype: 'list',
id: 'noteslist',
itemTpl: '<input type="checkbox" class="todo_checkbox " >'
<span class="note">{note_text}</span>'
store: 'Notes',
listeners: {
itemtap: function(view, index, target, record, event) {
}
}
When user check a checkbox corresponding list item's text color will be changed and when uncheck, it will back to normal. How to do so???
Please Help me regarding this...
-
Capture the change event on the checkbox elements
-
Thanks Mitchell for your reply but I am not sure how to "Capture the change event on the checkbox elements"....Can you please explain it little bit more???
-
Code:
listeners : {
element : 'element',
delegate : 'input[type=checkbox]',
change : function() {}
}
I haven't tested that but it should listen for the change event on the <input type='checkbox' />
-
Thanks a lot Mitchell for your reply...