Answered: Issue w/ dynamic grid with combobox columns
Hi, I'm using extjs 4.1 final. I'm creating dynamic grids using the reconfigure method. A couple of my columns need to be a combobox so I have an event listener for beforedit, which in this case checks which column it is, if its the correct column, it sets the column editor to a combobox and the combobox is linked to a store. The issue I'm having is the first time the grid is configured, the comboboxes work fine. I can select the cells within the columns that I defined as a combobox and I can select the values. But once I reconfigure the grid, there is an issue w/ the comboboxes. When I click on a column w/ the comboboxes, the dropdown gets rendered out of place and I can't select the values. I get an error stating "Uncaught TypeError: Cannot read property 'offsetHeight' of undefined ext-all-debug.js:16417"
I'm not sure if its a bug or it's an issue w/ the way I'm implementing it. Any help would be great. Thanks in advance.
Do you create a new instance of the combo each time you reconfigure?
Does the combo each time? console.log(combo) after reconfig?
I used the beforeedit event. What it does is it checks to see if its the column I want, if yes than it sets the column editor so if its a column that I want to be a combobox I do.
I know this isn't efficient since I would be setting the editor every time I click on one of the combobox column cell's. But it works fine for the initial grid when I reconfigure it again this is when I run into an issue. I thought it would be fine since running the reconfigure would create new columns and get rid of the old editor settings.
Thanks Scott you helped me solve my issue. By getting rid of the id, I realized it was an error caused by me referencing that id and listening for the expand event. I was trying to link up my comboboxes, where the value of one box affects the other. I added my logic else where and am no longer listening for that event for that specific combobox id and it seems to work fine now. Thanks again