View Full Version : CellEditing Grid Combobox content

3 Mar 2014, 11:23 AM
How can i display different content in a combo for each record record

for example

if I have COLUMNA and COLUMNB and COLUMNB is a combo
I want to display different values in COLUMNB in regarding to COLUMNB

In short how can I change the store url in combo(which is in COLUMNB) according to COLUMNA's value ?

5 Mar 2014, 6:06 AM
If an Editing plugin has been enabled on the grid, it can listen to the 'edit' event.
Documentation: http://docs.sencha.com/extjs/4.2.1/#!/api/Ext.grid.plugin.CellEditing-event-edit

grid.on('edit', function (editor, e) {
var combo;
if (e.field === 'FieldA') {
/*the field that was edited, should be the dataIndex for COLUMN_A*/
combo = e.column.nextSibling().getEditor();
/*"nextSibling()" gets the COLUMN_B(the immediately following sibling,
otherwise use a selector)*/
/*after this you can get the proxy combo.getStore().getProxy()... and do what you want*/