Reputation: 101
I'm working on a tree in Extjs 6 with 3 columns, but I'm getting icons and arrows in all columns. It doesn't look like this example.
I know that I could hide them with CSS, but they shouldn't be there. What am I doing wrong?
This is how my tree looks like.
View
Ext.define('CONVENIO.view.tipocontrato.TipoContrato', {
extend : 'Ext.tree.Panel',
//requires : [ 'CONVENIO.controller.TipoContrato', ],
//controller : 'tipocontrato',
store : Ext.create('CONVENIO.store.TipoContrato'),
xtype : 'tipo-contrato-tree',
useArrows : true,
rootVisible : false,
reserveScrollbar : true,
multiSelect: true,
columns : [ {
xtype : 'treecolumn',
text : 'Tipo de Contratos',
cellWrap : true,
flex : 3,
dataIndex : 'nombre',
sortable : true
}, {
xtype : 'treecolumn',
text : 'Inicio',
cellWrap : true,
flex : 1,
dataIndex : 'feInicio',
sortable : true
}, {
xtype : 'treecolumn',
text : 'Fin',
cellWrap : true,
flex : 1,
dataIndex : 'feFin',
sortable : true
} ],
bbar : [ '->', {
xtype : 'componente-error'
}, {
xtype : 'boton-nuevo',
}, {
xtype : 'boton-editar',
}, '-', {
xtype : 'boton-salir',
} ],
defaultButton : 'botonPrincipal',
/*listeners : {
beforeitemexpand : 'onBeforeItemExpand',
beforerender : 'onBeforeRender',
}*/
});
Store
Ext.define('CONVENIO.store.TipoContrato', {
extend: 'Ext.data.TreeStore',
model: 'CONVENIO.model.TipoContrato',
proxy: {
type: 'memory',
reader: {
type: 'json',
},
},
root : {
expanded: true,
children: [
{
nombre: 'A',
feInicio : '01/11/2015',
feFin: '30/11/2015'
},
{
nombre: 'B',
feInicio : '01/11/2015',
feFin: '30/11/2015',
children:[{
nombre: 'B.1',
feInicio : '01/11/2015',
feFin: '30/11/2015',
}]
},
{
nombre: 'C',
feInicio : '10/11/2015',
feFin: '30/11/2015',
}
]
},
});
Upvotes: 0
Views: 342
Reputation: 30082
Only the first column should be a treecolumn
. Remove the xtype
for the others and just let it default.
Upvotes: 1