-
7 Dec 2009 8:54 AM #1
CellEditor: ComboBox (different selections per row)
CellEditor: ComboBox (different selections per row)
hello,
we have cell editor showing a combo box in our grid. but now we have the requirement to show not selections from the combo box, the number and type of selections depends on some properties in our model.
is it possible to implement something like this? has anyone ideas?
thx
-
20 Apr 2010 3:42 AM #2
I'm in the same case, my combo items changes according the current cell value.
Is there a way to associate the Renderer (to access the cell value) and The Cell Editor (to access grid edition feature)?
has anyone ideas?
Thanks________
Mounir.B
-
30 Apr 2010 8:35 AM #3
you can try dynamicly load data for ComboBox store. In your listeners of grid put something like this:
editor-combo is a combobox used as cellEditor. On each record I store data I need - in variable "values". And before edit I load this values into a combobox store, so combobox items are custom per rowCode:beforeedit : function(event) { values = event.record.data.values; if(values.length > 0) { Ext.getCmp('editor-combo').store.loadData(values); } else { Ext.getCmp('editor-combo').store.loadData([]); } }
And one important thing - store of ComboBox is a SimpleStore.


Reply With Quote