I am trying to render a table in dataview. Everything is working fine but the tpl renderes twice:
First: the tpl content loaded along with the data Second: the tpl alone is rendered without any data
I found out that this question was already asked for a different version here. But there was no relevant answer to solve this issue.ExtJS tpl renders twice
{
xtype: 'dataview',
scrollable: true,
itemSelector: 'tr',
data: [{
selCodeType: 'selCodeType',
codeTypeMnc: 'codeTypeMnc'
}, {
selCodeType: 'selCodeType',
codeTypeMnc: 'codeTypeMnc'
}],
tpl: ['<table><thead>',
'<th>Select Code Type</th>',
'<th>Code Type MNC</th>',
'</thead>',
'<tbody>',
'<tpl for=".">',
'<tr>',
'<td>selCodeType</td>',
'<td>codeTypeMnc</td>',
'</tr>',
'</tpl>',
'</tbody></table>']
}
I have tried itemTpl as well. But no luck. It would be helpful if anyone point me what I am doing wrong here.
Thank you