ExtJs panel - adding dynamic components

I have a window with panel in inside the window. I add components to the panel dynamically. These components are in 'hbox' layout so that they are arranged horizontally. On click of a button i will add one more row of similar components in 'hbox' layout to the panel. Here the problem is that i want to add the second row below the first row, but the following code adds the components to the top of the panel.

panel.add(items);  #items is the group of comboboxes in hbox layout
panel.doLayout();

Any ideas to solve this problem? so that i can add second row of components below the first row.

Extjs Version is 3.4

Answers


I found the cause of the problem.

Cause: when we add components with same 'id' to a panel, then the newly added component will get added to the top of the panel.

Fix: Use 'itemId' instead of 'id' while adding same component to the panel.

Hope this will be useful for someone.


Need Your Help

Python, database results are saved with ('result')

python mysql

I select some urls from my database using a simple code

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.