PDA

View Full Version : checkbox in nested list leaf item



hemant1
18 Jun 2011, 4:37 AM
How can i add a checkbox before my nested list leaf item.

Basically i want to keep the records for number of visited pages
whatever page is visited by user checkbox is marked to show that page is visited by you

here is my code



Ext.regModel('ListItem', {
fields: [{name: 'text', type: 'string'}]
});

store = new Ext.data.TreeStore({
model: 'ListItem',
root: data,

proxy: {
type: 'memory',
reader: {
type: 'tree',
root: 'items',
}
},
autoLoad: true
});

my_List = new Ext.NestedList({
title: 'Menu',

//displayField: 'text',
getItemTextTpl: function() {
return '<tpl><div>{text}</div></tpl>' //i try to put here input type="checkbox", but it doen't work
},
store: store,
listeners:{
leafitemtap:leafitemtap
}
});


thanks,