PDA

View Full Version : Chnage position of an item added to a form



navvn
2 Oct 2011, 11:10 PM
Im adding an extra field after a form is loaded using this code:

Ext.getCmp('employeeModulePerms').add()
but it automatically add an item to the end of a form, is it possible to chose where an element should be added?

twaindev
3 Oct 2011, 1:15 AM
The Items property of a container is a MixedCollection so you can use it's Insert (http://docs.sencha.com/ext-js/4-0/#!/api/Ext.util.MixedCollection-method-insert) method to add items before the already existing items.