I am wondering if I can do something like this in ExtJS. I am creating my own button as an xtype and want it to be used in the table row I am creating.
testTpl: Ext.DomHelper.createTemplate(
{
tag: 'tbody',
children: [
{
tag: 'tr',
cls: 'test-row',
children:[{
tag: 'td',
cls: 'test-table-cell test-class1',
html: '{value1}'
},
{
tag: 'td',
xtype:'myxtype'
cls: 'test-table-cell test-class2',
html: '{value2}'
}]
}]
});
Its not possible to place ExtJS components inside of a extjs template. Though what you could do is to create a placeholder in your template and render ExtJS components into that placeholder in the render function.
Here are some links with examples:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.