PDA

View Full Version : scripts for template elements ?



muncher
14 Oct 2010, 8:10 AM
I am rendering some tables using the Xtemplates. However, I would like to add simple scripts like hide and show to those elements. How do I achieve that ? Did try putting the scripts in the tpl code, but somehow doesn't work.



tpl : new Ext.XTemplate(
'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<div>',
'<table>',
'<tr ><td colspan="4">',
'<table>',
'<thead>',
'<tr>',
'<th scope="col">Name</th>',
'<th scope="col">Id</th>',
'<th scope="col">Address</th>',
'<th scope="col">BirthDate</th>',
'</tr>',
'</thead>',
'<tbody>',
...
...
...
...

Animal
14 Oct 2010, 10:12 AM
Access the elements rendered by the template and do what you want with them.