PDA

View Full Version : How to behave check box tree like radio button tree



parvinder18
3 Aug 2012, 2:10 AM
Hi,

We have checkbox tree
http://try.sencha.com/extjs/4.0.7/examples/tree/check-tree/viewer.html

But i need to replace the checkboxes with Radio buttons. If replacement is not possible then i need to behave the check-box tree like a radio button tree. Means while selecting a new check box the previous checkbox selection should be removed.

Plz suggest.

TIA.
Parvinder

Romick
3 Aug 2012, 6:45 AM
Just add listener to your tree.


listeners:{
'itemclick': function( treeview, record, index, event, eOpts){
alert('click');
//do here all magic like radio
}
},

parvinder18
5 Aug 2012, 7:56 PM
Thanks Romick for your reply...

But am very new to EXT-JS and i need some code lines. I know there are listners like click, dblclick, checkchange etc. but i need the code that will do the trick. you have given some listner to add into tree but there is no code that how it will remove the selcetion and keep the latest one. It will be great if you please provide some code lines also within the listners.

TIA
Parvinder