24 Feb 2008 2:23 PM #1
Editable Combo box usage problem in Editable Grid Example
I am playing with the editable grid example,
I have couple of questions on that,
1. How do I get editable combo box (column: light) to work in this example, currently it accepts the values only from the drop down list. I would like to have user to enter his own option as well in the editable combo box. Is it possible?
2. Is there a way I can set different editor for same coulum in different rows, based on a record.
for example for 'light' column, I want to put combo editor on record 1 and text editor on record 2, something in those lines?
Thanks for your time
24 Feb 2008 10:15 PM #2
1. All you need to do is edit the config of the combo box in the editor of that column. You should remove the 'editable: false' and replace with 'editable: true', and you should probably also make sure that it's 'forceSelection: false' as well.
2. There isn't a built-in way to do it, but I do remember this question has come up before so there is some info on the forum about this that you should be able to find with a bit of searching.'Once again, fortune vomits on my eiderdown'
- Edmund Blackadder
25 Feb 2008 12:39 AM #3
- Join Date
- Mar 2007
- The Netherlands
- Vote Rating
2. You'll have to create your own getCellEditor(colIndex, rowIndex) function that returns the appropriate editor for the cell (the default implementation returns the editor for the column from the columnmodel).