Moinsen
31 Jul 2012, 12:04 AM
Hi,
i am looking for a way to put a combobox in a grid. I could not find a working example.
This is my columns config for the grid:
[{header: 'Sprache', dataIndex: 'sprache', sortable : true, flex:1,
editor: { xtype:'combobox', displayField:'_name', valueField:'sprache', triggerAction:'all',mode:'local',
store: Ext.create('Ext.data.Store', {
fields: ['sprache', '_name'],
data : [
{"sprache":"de", "_name":"Deutsch"},
{"sprache":"en", "_name":"Englisch"},
{"sprache":"fr", "_name":"Französisch"},
{"sprache":"nl", "_name":"Niederländisch"},
{"sprache":"it", "_name":"Italienisch"},
{"sprache":"es", "_name":"Spanisch"},
{"sprache":"tr", "_name":"Türkisch"}
//...
]
})
}
}, {header: 'Name', dataIndex: 'name', sortable : true, flex:1}]);
But no combobox appears. Whats wrong with this or is there something missing. This is in 4.1.
Thanks
i am looking for a way to put a combobox in a grid. I could not find a working example.
This is my columns config for the grid:
[{header: 'Sprache', dataIndex: 'sprache', sortable : true, flex:1,
editor: { xtype:'combobox', displayField:'_name', valueField:'sprache', triggerAction:'all',mode:'local',
store: Ext.create('Ext.data.Store', {
fields: ['sprache', '_name'],
data : [
{"sprache":"de", "_name":"Deutsch"},
{"sprache":"en", "_name":"Englisch"},
{"sprache":"fr", "_name":"Französisch"},
{"sprache":"nl", "_name":"Niederländisch"},
{"sprache":"it", "_name":"Italienisch"},
{"sprache":"es", "_name":"Spanisch"},
{"sprache":"tr", "_name":"Türkisch"}
//...
]
})
}
}, {header: 'Name', dataIndex: 'name', sortable : true, flex:1}]);
But no combobox appears. Whats wrong with this or is there something missing. This is in 4.1.
Thanks