PDA

View Full Version : editable column with combo box



AssetWorks
23 Aug 2013, 6:41 AM
so I have a grid with cellediting plugin,
in the column that I want the editor I have a 'combo'.
my store is local and the problem that I'm running into is
that when I choose a value the valuefield is being displayed instead of the displayfield
any help would be great,
check out my fiddle,
(https://fiddle.sencha.com/#fiddle/b3)https://fiddle.sencha.com/#fiddle/b3

Ext.require(['Ext.grid.*']);


Ext.onReady(function() {
Ext.create('Ext.grid.Panel', {
itemId: 'recipientGrid',
renderTo: Ext.getBody(),
store: [
[]
],
height: 100,


width: 300,
margin: '0 0 5 0',
plugins: [{
ptype: 'cellediting',
clicksToEdit: 1
}],
columns: [{
text: 'kind',
cls: 'editColumn',
dataIndex: 'EmailToType',
flex: 1,
editor: {
xtype: 'combo',
store: [
['N', 'None'],
['T', 'To'],
['C', 'CC'],
['B', 'BCC']
],
queryMode: 'local'
}
}]
});
});

Gary Schlosberg
3 Sep 2013, 8:08 AM
I believe you need to use a renderer on that column to get the display you desire.
http://www.sencha.com/forum/showthread.php?158422