-
16 Apr 2012 11:07 AM #1
Unanswered: CellEditing change editor of other cell
Unanswered: CellEditing change editor of other cell
Hello together
Can somebody help me to change the editor of another cell?
Thanks for your support in advance!Code:plugins: [{ ptype: 'cellediting', listeners: { edit: function(editor, e, eOpts) { //How can I here change the editor of the next cell on the right side (e.colIdx + 1)? } } }],
Kind regards, extjser12
-
16 Apr 2012 11:32 AM #2Sencha - Support Team
- Join Date
- Jul 2010
- Location
- Houston, Tx
- Posts
- 7,186
- Vote Rating
- 194
- Answers
- 433
You could just change the field value in the store itself.
Scott.
-
16 Apr 2012 11:43 AM #3
Is it not possible to change the editor of another field? I want to achieve, that if a specific value is selected in a combobox another cell gets another editor.
-
16 Apr 2012 5:35 PM #4
Looks like you can use grid.column.Column's setEditor method.
http://docs.sencha.com/ext-js/4-0/#!/api/Ext.grid.column.Column-method-setEditor
grid.headerCt.down('gridcolumn[dataIndex="dependantColumn"]').setEditor({...})
-
17 Apr 2012 8:50 AM #5
Nice. Thanks for your help!

Is it also possible to extend your selector, so that it searchs for the "dataIndex" only in a specific row (e.g. e.rowIdx)?
Kind regards, extjser12
-
17 Apr 2012 9:17 AM #6
Hmm... I think for that I might hook into the cell/row edit event
http://docs.sencha.com/ext-js/4-0/#!...ing-event-edit
That would give me the row I'm working on at the time that I'm executing setEditor().
-
17 Apr 2012 9:30 AM #7
Yes I know. But I need an other row in the same column and I don't know how can I do this? Do you have any idea?
Kind regards, extjser12
-
17 Apr 2012 12:43 PM #8
Not sure how to do that exactly. I know that the setEditor is done by column, though, if that helps. Good luck.
-
17 Apr 2012 1:10 PM #9
Down() method return all matched cells
Down() method return all matched cells
Ok thanks. Maybe I can iterate throught all returned cells from the "down()" method and select then the right cell. But the "down()" method returns me only the first match. Do you maybe know how can I get all cells with the same "dataIndex"?
Thank you very much for your support!
Kind regards, extjser12
-
17 Apr 2012 2:03 PM #10
I've not used it, but looks like grid.getView().getCell(param1, param2) is the method you'd be after.
param1 = record you're working with
param2 = column
You'd have to iterate the store to get each record, but with the previous selector you'd have the column you're interested in.


Reply With Quote