View Full Version : [Solved] Selecting Grid rows in a collapsed accordion

1 Feb 2010, 5:22 PM
So I have an accordion layout with a grid panel in one of the accordion items (not the default item).

I want to be able to do a selectRows on the grid (the grid has been populated by this time) even if that accordion item has never been expanded.

Right now if I've never expanded the accordion item and try to select a row, FireBug gives me "this.grid is undefined". If I open the accordion item in question and then try to select rows, it works just fine.

Is there an option in the accordion layout I need to set to make the grid available even if it has not been shown?

1 Feb 2010, 6:04 PM
Ok. So now that I've gotten further in to coding, it's not just limited to grids, but anything on accordion item that has not been shown. I just last was trying to set a slider on an accordion item I had not expanded and it gave me a "this.innerEl is undefined" error.

Of course if I visit the accordion item first it will work. So somehow I have to "render" (that may not be the right word) each accordion item before I can mess with elements in those items.

2 Feb 2010, 6:30 PM
More progress, but still no answer.

So not all of the accordion items are having this problem. The items that are having the problem are ones where there is another container layout between the accordion and the elements I want to mess with.

Example: The window is a accordion layout, in one of the items is a border layout with east, center, and west panels, in the panels are grid layouts.

It seems like the having the border layout there is giving me the trouble. I have some grid layouts directly in the accordion item and the are responsive even if they haven't been viewed.

6 Feb 2010, 7:29 AM
Still haven't gotten any further on this. Any help?

6 Feb 2010, 9:02 AM
Ok. So I found a way to get this to work. I'm not sure if this is the best way, but at least is works.

When I first show the window. I call doLayout(null,true) on the accordion items that are container layouts (for me this was border and column layout items). This way all of the grids are rendered and accessible to change even if the user has not opened them.