View Full Version : Ext JS controls in templates

13 Feb 2013, 3:16 AM
Can we use Ext JS cross-browser controls in templates for template column and how we can do it?

Our problem in few words:
We are developing web cross-browser application for automatic system.
Elements in Grd Panel need to have controls like buttons, sliders and so on.
We use Template column and use different templates for different objects.
We can't use html5 elements.

Thank you for your time.

14 Feb 2013, 9:13 PM
May want to take a look at: http://skirtlesden.com/ux/ctemplate

1 Oct 2013, 2:04 AM
Does anyone have an example of creating a CTemplate for grid using MVC class definition?
I am creating the CTemplate on init() - but I am unsure of how/when to overwrite the template

initComponent: function() {
this.cellEditing = new Ext.grid.plugin.CellEditing({
clicksToEdit: 1
this.template = Ext.create('Ext.ux.CTemplate',
'<div id="myTemplate">',
'<p><b> job phase: </b>{chartnew}</p>',
this.rowExpander = new Ext.grid.plugin.RowExpander({
ptype: 'rowexpander',
locked: true,
rowBodyTpl : this.template

how and where can i implement the overwrite in MVC view class:

template.overwrite(Ext.fly(...), {

chartnew: Ext.create('Ext.button.Button', {
text: 'This is really a chart component'

also should template.overwrite(...) be targeting template.overwrite('myTemplate') ?