PDA

View Full Version : how to get the editor in an item of grid panel?



chenzhaoplus
7 May 2012, 11:52 PM
Hey , guys! I want to get the editor's store.
But I don't know how to get the editor.




items: {
id : 'tableName',
text : "Table Name",
header : 'Table Name',
dataIndex : 'tableName',
width : 190,
editor : {
xtype : 'combobox',
typeAhead : true,
triggerAction : 'all',
selectOnTab : true,
store : [['FoodEmbranchment', 'FoodEmbranchment']
lazyRender : true,
listClass : 'x-combo-list-small'
}
}


item = gridPanel.getComponent("tableName");
editor = ?;
store = ?;

Thanks for your help!

slemmon
9 May 2012, 2:25 PM
See the getEditor() method:
http://docs.sencha.com/ext-js/4-1/#!/api/Ext.grid.column.Column-method-getEditor


gridPanel.getComponent("tableName") (http://docs.sencha.com/ext-js/4-1/#!/api/Ext.grid.column.Column-method-getEditor).getEditor()